Merge pull request #120 from TheBlueMatt/main v0.0.112.0
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Fri, 28 Oct 2022 20:44:17 +0000 (20:44 +0000)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 20:44:17 +0000 (20:44 +0000)
Update to 0.0.112 (with RGS)

612 files changed:
.github/workflows/build.yml
gen_type_mapping.py
java_strings.py
node-net/test/test.mts
src/main/java/org/ldk/batteries/ChannelManagerConstructor.java
src/main/java/org/ldk/enums/ChannelMonitorUpdateErr.java [deleted file]
src/main/java/org/ldk/enums/ChannelMonitorUpdateStatus.java [new file with mode: 0644]
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/APIError.java
src/main/java/org/ldk/structs/AcceptChannel.java
src/main/java/org/ldk/structs/AnnouncementSignatures.java
src/main/java/org/ldk/structs/BackgroundProcessor.java
src/main/java/org/ldk/structs/BaseSign.java
src/main/java/org/ldk/structs/BestBlock.java
src/main/java/org/ldk/structs/ChainMonitor.java
src/main/java/org/ldk/structs/ChannelAnnouncement.java
src/main/java/org/ldk/structs/ChannelConfig.java
src/main/java/org/ldk/structs/ChannelFeatures.java
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/ChannelManager.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/ChannelReady.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ChannelTransactionParameters.java
src/main/java/org/ldk/structs/ChannelTypeFeatures.java
src/main/java/org/ldk/structs/ChannelUpdate.java
src/main/java/org/ldk/structs/ChannelUpdateInfo.java
src/main/java/org/ldk/structs/ClosingSigned.java
src/main/java/org/ldk/structs/ClosingSignedFeeRange.java
src/main/java/org/ldk/structs/ClosingTransaction.java
src/main/java/org/ldk/structs/ClosureReason.java
src/main/java/org/ldk/structs/CommitmentSigned.java
src/main/java/org/ldk/structs/CommitmentUpdate.java
src/main/java/org/ldk/structs/CustomOnionMessageContents.java [new file with mode: 0644]
src/main/java/org/ldk/structs/CustomOnionMessageHandler.java [new file with mode: 0644]
src/main/java/org/ldk/structs/DataLossProtect.java
src/main/java/org/ldk/structs/DecodeError.java
src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/ExpiryTime.java
src/main/java/org/ldk/structs/Filter.java
src/main/java/org/ldk/structs/FundingCreated.java
src/main/java/org/ldk/structs/FundingSigned.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/GraphSyncError.java
src/main/java/org/ldk/structs/HTLCDestination.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/HTLCUpdate.java
src/main/java/org/ldk/structs/Hostname.java
src/main/java/org/ldk/structs/IgnoringMessageHandler.java
src/main/java/org/ldk/structs/Init.java
src/main/java/org/ldk/structs/InitFeatures.java
src/main/java/org/ldk/structs/InvoiceFeatures.java
src/main/java/org/ldk/structs/KeysInterface.java
src/main/java/org/ldk/structs/MonitorEvent.java
src/main/java/org/ldk/structs/NetAddress.java
src/main/java/org/ldk/structs/NetworkGraph.java
src/main/java/org/ldk/structs/NetworkUpdate.java
src/main/java/org/ldk/structs/NodeAlias.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/OnionMessage.java
src/main/java/org/ldk/structs/OnionMessageHandler.java
src/main/java/org/ldk/structs/OnionMessenger.java
src/main/java/org/ldk/structs/OpenChannel.java
src/main/java/org/ldk/structs/Option_CustomOnionMessageContentsZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ParseError.java
src/main/java/org/ldk/structs/ParseOrSemanticError.java
src/main/java/org/ldk/structs/PaymentSendFailure.java
src/main/java/org/ldk/structs/PeerManager.java
src/main/java/org/ldk/structs/Persist.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/PositiveTimestamp.java
src/main/java/org/ldk/structs/ProbabilisticScorer.java
src/main/java/org/ldk/structs/ProbabilisticScoringParameters.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/RapidGossipSync.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
src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedRouteDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NetAddressDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java [deleted file]
src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/RevokeAndACK.java
src/main/java/org/ldk/structs/Router.java
src/main/java/org/ldk/structs/RoutingMessageHandler.java
src/main/java/org/ldk/structs/SendError.java
src/main/java/org/ldk/structs/Shutdown.java
src/main/java/org/ldk/structs/ShutdownScript.java
src/main/java/org/ldk/structs/SpendableOutputDescriptor.java
src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java
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/UtilMethods.java
src/main/java/org/ldk/structs/WarningMessage.java
src/main/java/org/ldk/structs/Watch.java
src/main/java/org/ldk/structs/WatchedOutput.java
src/main/java/org/ldk/util/InternalUtils.java
src/main/jni/bindings.c
src/main/jni/bindings.c.body
src/main/jni/org_ldk_enums_ChannelMonitorUpdateErr.h [deleted file]
src/main/jni/org_ldk_enums_ChannelMonitorUpdateStatus.h [new file with mode: 0644]
src/main/jni/org_ldk_enums_Recipient.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings.h
src/main/jni/org_ldk_impl_bindings_LDKBech32Error.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_NetAddressZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_ScalarZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_WriteableScoreZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKDecodeError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKDestination.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKEffectiveCapacity.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKGossipSync.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKGraphSyncError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKHTLCDestination.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKParseError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKParseOrSemanticError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKRetry.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKSendError.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.c.body
ts/bindings.mts
ts/enums/ChannelMonitorUpdateErr.mts [deleted file]
ts/enums/ChannelMonitorUpdateStatus.mts [new file with mode: 0644]
ts/enums/IOError.mts [new file with mode: 0644]
ts/index.mts
ts/structs/APIError.mts
ts/structs/AcceptChannel.mts
ts/structs/Access.mts
ts/structs/AnnouncementSignatures.mts
ts/structs/Balance.mts
ts/structs/BaseSign.mts
ts/structs/Bech32Error.mts
ts/structs/BestBlock.mts
ts/structs/BigEndianScalar.mts
ts/structs/BigSize.mts
ts/structs/BlindedHop.mts
ts/structs/BlindedRoute.mts
ts/structs/BroadcasterInterface.mts
ts/structs/BuiltCommitmentTransaction.mts
ts/structs/ChainMonitor.mts
ts/structs/ChainParameters.mts
ts/structs/ChannelAnnouncement.mts
ts/structs/ChannelConfig.mts
ts/structs/ChannelCounterparty.mts
ts/structs/ChannelDetails.mts
ts/structs/ChannelFeatures.mts
ts/structs/ChannelHandshakeConfig.mts
ts/structs/ChannelHandshakeLimits.mts
ts/structs/ChannelInfo.mts
ts/structs/ChannelManager.mts
ts/structs/ChannelManagerReadArgs.mts
ts/structs/ChannelMessageHandler.mts
ts/structs/ChannelMonitor.mts
ts/structs/ChannelMonitorUpdate.mts
ts/structs/ChannelPublicKeys.mts
ts/structs/ChannelReady.mts
ts/structs/ChannelReestablish.mts
ts/structs/ChannelTransactionParameters.mts
ts/structs/ChannelTypeFeatures.mts
ts/structs/ChannelUpdate.mts
ts/structs/ChannelUpdateInfo.mts
ts/structs/ChannelUsage.mts
ts/structs/ClosingSigned.mts
ts/structs/ClosingSignedFeeRange.mts
ts/structs/ClosingTransaction.mts
ts/structs/ClosureReason.mts
ts/structs/CommitmentSigned.mts
ts/structs/CommitmentTransaction.mts
ts/structs/CommitmentUpdate.mts
ts/structs/CommonBase.mts
ts/structs/Confirm.mts
ts/structs/CounterpartyChannelTransactionParameters.mts
ts/structs/CounterpartyCommitmentSecrets.mts
ts/structs/CounterpartyForwardingInfo.mts
ts/structs/CustomMessageHandler.mts
ts/structs/CustomMessageReader.mts
ts/structs/CustomOnionMessageContents.mts [new file with mode: 0644]
ts/structs/CustomOnionMessageHandler.mts [new file with mode: 0644]
ts/structs/DataLossProtect.mts
ts/structs/DecodeError.mts
ts/structs/DefaultRouter.mts
ts/structs/DelayedPaymentOutputDescriptor.mts
ts/structs/Description.mts
ts/structs/Destination.mts
ts/structs/DirectedChannelInfo.mts
ts/structs/DirectedChannelTransactionParameters.mts
ts/structs/EffectiveCapacity.mts
ts/structs/ErrorAction.mts
ts/structs/ErrorMessage.mts
ts/structs/ErroringMessageHandler.mts
ts/structs/Event.mts
ts/structs/EventHandler.mts
ts/structs/EventsProvider.mts
ts/structs/ExpandedKey.mts
ts/structs/ExpiryTime.mts
ts/structs/Fallback.mts
ts/structs/FeeEstimator.mts
ts/structs/Filter.mts
ts/structs/FixedPenaltyScorer.mts
ts/structs/FundingCreated.mts
ts/structs/FundingSigned.mts
ts/structs/Future.mts
ts/structs/FutureCallback.mts
ts/structs/GossipTimestampFilter.mts
ts/structs/GraphSyncError.mts [new file with mode: 0644]
ts/structs/HTLCDestination.mts
ts/structs/HTLCOutputInCommitment.mts
ts/structs/HTLCUpdate.mts
ts/structs/HolderCommitmentTransaction.mts
ts/structs/Hostname.mts
ts/structs/IgnoringMessageHandler.mts
ts/structs/InFlightHtlcs.mts
ts/structs/InMemorySigner.mts
ts/structs/Init.mts
ts/structs/InitFeatures.mts
ts/structs/InvalidShutdownScript.mts
ts/structs/Invoice.mts
ts/structs/InvoiceFeatures.mts
ts/structs/InvoicePayer.mts
ts/structs/InvoiceSignature.mts
ts/structs/KeysInterface.mts
ts/structs/KeysManager.mts
ts/structs/LightningError.mts
ts/structs/Listen.mts
ts/structs/LockableScore.mts
ts/structs/LockedChannelMonitor.mts
ts/structs/Logger.mts
ts/structs/MessageHandler.mts
ts/structs/MessageSendEvent.mts
ts/structs/MessageSendEventsProvider.mts
ts/structs/MinFinalCltvExpiry.mts
ts/structs/MonitorEvent.mts
ts/structs/MonitorUpdateId.mts
ts/structs/MultiThreadedLockableScore.mts
ts/structs/MultiThreadedScoreLock.mts
ts/structs/NetAddress.mts
ts/structs/NetworkGraph.mts
ts/structs/NetworkUpdate.mts
ts/structs/NodeAlias.mts
ts/structs/NodeAnnouncement.mts
ts/structs/NodeAnnouncementInfo.mts
ts/structs/NodeFeatures.mts
ts/structs/NodeId.mts
ts/structs/NodeInfo.mts
ts/structs/OnionMessage.mts
ts/structs/OnionMessageHandler.mts
ts/structs/OnionMessageProvider.mts
ts/structs/OnionMessenger.mts
ts/structs/OpenChannel.mts
ts/structs/Option_AccessZ.mts
ts/structs/Option_C2Tuple_u64u64ZZ.mts
ts/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mts
ts/structs/Option_CVec_NetAddressZZ.mts
ts/structs/Option_ClosureReasonZ.mts
ts/structs/Option_CustomOnionMessageContentsZ.mts [new file with mode: 0644]
ts/structs/Option_EventZ.mts
ts/structs/Option_FilterZ.mts
ts/structs/Option_HTLCDestinationZ.mts
ts/structs/Option_MonitorEventZ.mts
ts/structs/Option_NetAddressZ.mts
ts/structs/Option_NetworkUpdateZ.mts
ts/structs/Option_ScalarZ.mts
ts/structs/Option_TypeZ.mts
ts/structs/Option_u16Z.mts
ts/structs/Option_u32Z.mts
ts/structs/Option_u64Z.mts
ts/structs/OutPoint.mts
ts/structs/P2PGossipSync.mts
ts/structs/ParseError.mts
ts/structs/ParseOrSemanticError.mts
ts/structs/PayeePubKey.mts
ts/structs/Payer.mts
ts/structs/PaymentError.mts
ts/structs/PaymentParameters.mts
ts/structs/PaymentPurpose.mts
ts/structs/PaymentSendFailure.mts
ts/structs/PeerHandleError.mts
ts/structs/PeerManager.mts
ts/structs/Persist.mts
ts/structs/Persister.mts
ts/structs/PhantomKeysManager.mts
ts/structs/PhantomRouteHints.mts
ts/structs/Ping.mts
ts/structs/Pong.mts
ts/structs/PositiveTimestamp.mts
ts/structs/PrivateRoute.mts
ts/structs/ProbabilisticScorer.mts
ts/structs/ProbabilisticScoringParameters.mts
ts/structs/QueryChannelRange.mts
ts/structs/QueryShortChannelIds.mts
ts/structs/RapidGossipSync.mts [new file with mode: 0644]
ts/structs/RawDataPart.mts
ts/structs/RawInvoice.mts
ts/structs/ReadOnlyNetworkGraph.mts
ts/structs/Record.mts
ts/structs/ReplyChannelRange.mts
ts/structs/ReplyShortChannelIdsEnd.mts
ts/structs/Result_AcceptChannelDecodeErrorZ.mts
ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.mts
ts/structs/Result_BlindedHopDecodeErrorZ.mts
ts/structs/Result_BlindedRouteDecodeErrorZ.mts
ts/structs/Result_BlindedRouteNoneZ.mts
ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mts
ts/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mts
ts/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mts
ts/structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mts
ts/structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mts
ts/structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mts
ts/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mts
ts/structs/Result_C2Tuple_SignatureSignatureZNoneZ.mts
ts/structs/Result_COption_ClosureReasonZDecodeErrorZ.mts
ts/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mts [new file with mode: 0644]
ts/structs/Result_COption_EventZDecodeErrorZ.mts
ts/structs/Result_COption_HTLCDestinationZDecodeErrorZ.mts
ts/structs/Result_COption_MonitorEventZDecodeErrorZ.mts
ts/structs/Result_COption_NetworkUpdateZDecodeErrorZ.mts
ts/structs/Result_COption_TypeZDecodeErrorZ.mts
ts/structs/Result_CVec_CVec_u8ZZNoneZ.mts
ts/structs/Result_CVec_SignatureZNoneZ.mts
ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts
ts/structs/Result_ChannelAnnouncementDecodeErrorZ.mts
ts/structs/Result_ChannelConfigDecodeErrorZ.mts
ts/structs/Result_ChannelCounterpartyDecodeErrorZ.mts
ts/structs/Result_ChannelDetailsDecodeErrorZ.mts
ts/structs/Result_ChannelFeaturesDecodeErrorZ.mts
ts/structs/Result_ChannelInfoDecodeErrorZ.mts
ts/structs/Result_ChannelMonitorUpdateDecodeErrorZ.mts
ts/structs/Result_ChannelPublicKeysDecodeErrorZ.mts
ts/structs/Result_ChannelReadyDecodeErrorZ.mts
ts/structs/Result_ChannelReestablishDecodeErrorZ.mts
ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.mts
ts/structs/Result_ChannelTypeFeaturesDecodeErrorZ.mts
ts/structs/Result_ChannelUpdateDecodeErrorZ.mts
ts/structs/Result_ChannelUpdateInfoDecodeErrorZ.mts
ts/structs/Result_ClosingSignedDecodeErrorZ.mts
ts/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mts
ts/structs/Result_CommitmentSignedDecodeErrorZ.mts
ts/structs/Result_CommitmentTransactionDecodeErrorZ.mts
ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mts
ts/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mts
ts/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mts
ts/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mts
ts/structs/Result_DescriptionCreationErrorZ.mts
ts/structs/Result_ErrorMessageDecodeErrorZ.mts
ts/structs/Result_FixedPenaltyScorerDecodeErrorZ.mts
ts/structs/Result_FundingCreatedDecodeErrorZ.mts
ts/structs/Result_FundingSignedDecodeErrorZ.mts
ts/structs/Result_GossipTimestampFilterDecodeErrorZ.mts
ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mts
ts/structs/Result_HTLCUpdateDecodeErrorZ.mts
ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.mts
ts/structs/Result_InFlightHtlcsDecodeErrorZ.mts
ts/structs/Result_InMemorySignerDecodeErrorZ.mts
ts/structs/Result_InitDecodeErrorZ.mts
ts/structs/Result_InitFeaturesDecodeErrorZ.mts
ts/structs/Result_InvoiceFeaturesDecodeErrorZ.mts
ts/structs/Result_InvoiceParseOrSemanticErrorZ.mts
ts/structs/Result_InvoiceSemanticErrorZ.mts
ts/structs/Result_InvoiceSignOrCreationErrorZ.mts
ts/structs/Result_LockedChannelMonitorNoneZ.mts
ts/structs/Result_NetAddressDecodeErrorZ.mts
ts/structs/Result_NetworkGraphDecodeErrorZ.mts
ts/structs/Result_NodeAliasDecodeErrorZ.mts
ts/structs/Result_NodeAnnouncementDecodeErrorZ.mts
ts/structs/Result_NodeAnnouncementInfoDecodeErrorZ.mts
ts/structs/Result_NodeFeaturesDecodeErrorZ.mts
ts/structs/Result_NodeIdDecodeErrorZ.mts
ts/structs/Result_NodeInfoDecodeErrorZ.mts
ts/structs/Result_NoneAPIErrorZ.mts
ts/structs/Result_NoneChannelMonitorUpdateErrZ.mts [deleted file]
ts/structs/Result_NoneErrorZ.mts
ts/structs/Result_NoneLightningErrorZ.mts
ts/structs/Result_NoneNoneZ.mts
ts/structs/Result_NonePaymentSendFailureZ.mts
ts/structs/Result_NonePeerHandleErrorZ.mts
ts/structs/Result_NoneSemanticErrorZ.mts
ts/structs/Result_NoneSendErrorZ.mts
ts/structs/Result_OnionMessageDecodeErrorZ.mts
ts/structs/Result_OpenChannelDecodeErrorZ.mts
ts/structs/Result_OutPointDecodeErrorZ.mts
ts/structs/Result_PayeePubKeyErrorZ.mts
ts/structs/Result_PaymentIdPaymentErrorZ.mts
ts/structs/Result_PaymentIdPaymentSendFailureZ.mts
ts/structs/Result_PaymentParametersDecodeErrorZ.mts
ts/structs/Result_PaymentPreimageAPIErrorZ.mts
ts/structs/Result_PaymentPurposeDecodeErrorZ.mts
ts/structs/Result_PaymentSecretAPIErrorZ.mts
ts/structs/Result_PaymentSecretNoneZ.mts
ts/structs/Result_PhantomRouteHintsDecodeErrorZ.mts
ts/structs/Result_PingDecodeErrorZ.mts
ts/structs/Result_PongDecodeErrorZ.mts
ts/structs/Result_PositiveTimestampCreationErrorZ.mts
ts/structs/Result_PrivateRouteCreationErrorZ.mts
ts/structs/Result_ProbabilisticScorerDecodeErrorZ.mts
ts/structs/Result_PublicKeyErrorZ.mts
ts/structs/Result_PublicKeyNoneZ.mts [new file with mode: 0644]
ts/structs/Result_QueryChannelRangeDecodeErrorZ.mts
ts/structs/Result_QueryShortChannelIdsDecodeErrorZ.mts
ts/structs/Result_RecoverableSignatureNoneZ.mts
ts/structs/Result_ReplyChannelRangeDecodeErrorZ.mts
ts/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mts
ts/structs/Result_RevokeAndACKDecodeErrorZ.mts
ts/structs/Result_RouteDecodeErrorZ.mts
ts/structs/Result_RouteHintDecodeErrorZ.mts
ts/structs/Result_RouteHintHopDecodeErrorZ.mts
ts/structs/Result_RouteHopDecodeErrorZ.mts
ts/structs/Result_RouteLightningErrorZ.mts
ts/structs/Result_RouteParametersDecodeErrorZ.mts
ts/structs/Result_RoutingFeesDecodeErrorZ.mts
ts/structs/Result_SecretKeyErrorZ.mts
ts/structs/Result_SecretKeyNoneZ.mts
ts/structs/Result_SharedSecretNoneZ.mts
ts/structs/Result_ShutdownDecodeErrorZ.mts
ts/structs/Result_ShutdownScriptDecodeErrorZ.mts
ts/structs/Result_ShutdownScriptInvalidShutdownScriptZ.mts
ts/structs/Result_SiPrefixParseErrorZ.mts
ts/structs/Result_SignDecodeErrorZ.mts
ts/structs/Result_SignatureNoneZ.mts
ts/structs/Result_SignedRawInvoiceParseErrorZ.mts
ts/structs/Result_SpendableOutputDescriptorDecodeErrorZ.mts
ts/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mts
ts/structs/Result_StringErrorZ.mts
ts/structs/Result_TransactionNoneZ.mts
ts/structs/Result_TrustedClosingTransactionNoneZ.mts
ts/structs/Result_TrustedCommitmentTransactionNoneZ.mts
ts/structs/Result_TxCreationKeysDecodeErrorZ.mts
ts/structs/Result_TxCreationKeysErrorZ.mts
ts/structs/Result_TxOutAccessErrorZ.mts
ts/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mts
ts/structs/Result_UnsignedChannelUpdateDecodeErrorZ.mts
ts/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mts
ts/structs/Result_UpdateAddHTLCDecodeErrorZ.mts
ts/structs/Result_UpdateFailHTLCDecodeErrorZ.mts
ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mts
ts/structs/Result_UpdateFeeDecodeErrorZ.mts
ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.mts
ts/structs/Result_WarningMessageDecodeErrorZ.mts
ts/structs/Result__u832APIErrorZ.mts
ts/structs/Result_boolLightningErrorZ.mts
ts/structs/Result_boolPeerHandleErrorZ.mts
ts/structs/Result_u32GraphSyncErrorZ.mts [new file with mode: 0644]
ts/structs/Retry.mts
ts/structs/RevokeAndACK.mts
ts/structs/Route.mts
ts/structs/RouteHint.mts
ts/structs/RouteHintHop.mts
ts/structs/RouteHop.mts
ts/structs/RouteParameters.mts
ts/structs/Router.mts
ts/structs/RoutingFees.mts
ts/structs/RoutingMessageHandler.mts
ts/structs/Score.mts
ts/structs/SendError.mts
ts/structs/Sha256.mts
ts/structs/Shutdown.mts
ts/structs/ShutdownScript.mts
ts/structs/Sign.mts
ts/structs/SignOrCreationError.mts
ts/structs/SignedRawInvoice.mts
ts/structs/SocketDescriptor.mts
ts/structs/SpendableOutputDescriptor.mts
ts/structs/StaticPaymentOutputDescriptor.mts
ts/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mts
ts/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mts
ts/structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mts
ts/structs/TrustedClosingTransaction.mts
ts/structs/TrustedCommitmentTransaction.mts
ts/structs/TwoTuple_BlockHashChannelManagerZ.mts
ts/structs/TwoTuple_BlockHashChannelMonitorZ.mts
ts/structs/TwoTuple_OutPointScriptZ.mts
ts/structs/TwoTuple_PaymentHashPaymentIdZ.mts
ts/structs/TwoTuple_PaymentHashPaymentSecretZ.mts
ts/structs/TwoTuple_PublicKeyTypeZ.mts
ts/structs/TwoTuple_SignatureCVec_SignatureZZ.mts
ts/structs/TwoTuple_SignatureSignatureZ.mts
ts/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mts
ts/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mts
ts/structs/TwoTuple_u32ScriptZ.mts
ts/structs/TwoTuple_u32TxOutZ.mts
ts/structs/TwoTuple_u64u64Z.mts
ts/structs/TwoTuple_usizeTransactionZ.mts
ts/structs/TxCreationKeys.mts
ts/structs/TxOut.mts
ts/structs/Type.mts
ts/structs/UnsignedChannelAnnouncement.mts
ts/structs/UnsignedChannelUpdate.mts
ts/structs/UnsignedNodeAnnouncement.mts
ts/structs/UpdateAddHTLC.mts
ts/structs/UpdateFailHTLC.mts
ts/structs/UpdateFailMalformedHTLC.mts
ts/structs/UpdateFee.mts
ts/structs/UpdateFulfillHTLC.mts
ts/structs/UserConfig.mts
ts/structs/UtilMethods.mts
ts/structs/WarningMessage.mts
ts/structs/Watch.mts
ts/structs/WatchedOutput.mts
ts/structs/WriteableScore.mts
ts/test/tests.mts
ts/tsconfig.json
typescript_strings.py

index 718976eb636318c66aa97d207f76323b7ada52a8..8b11eba65c5025830ebac9ec26bd783a2e093547 100644 (file)
@@ -39,11 +39,11 @@ jobs:
           # Note this is a different endpoint, as we need one non-upstream commit!
           git clone https://git.bitcoin.ninja/rust-lightning
           cd rust-lightning
-          git checkout origin/2022-09-111-java-bindings
+          git checkout origin/2022-10-112-java-bindings
           cd ..
           git clone https://github.com/lightningdevkit/ldk-c-bindings
           cd ldk-c-bindings
-          git checkout 0.0.111
+          git checkout 0.0.112
       - name: Rebuild C bindings without STD
         run: |
           cd ldk-c-bindings
@@ -130,11 +130,11 @@ jobs:
           # Note this is a different endpoint, as we need one non-upstream commit!
           git clone https://git.bitcoin.ninja/rust-lightning
           cd rust-lightning
-          git checkout origin/2022-09-111-java-bindings
+          git checkout origin/2022-10-112-java-bindings
           cd ..
           git clone https://github.com/lightningdevkit/ldk-c-bindings
           cd ldk-c-bindings
-          git checkout 0.0.111
+          git checkout 0.0.112
       - name: Rebuild C bindings, and check the sample app builds + links
         run: |
           cd ldk-c-bindings
@@ -185,11 +185,11 @@ jobs:
           # Note this is a different endpoint, as we need one non-upstream commit!
           git clone https://git.bitcoin.ninja/rust-lightning
           cd rust-lightning
-          git checkout origin/2022-09-111-java-bindings
+          git checkout origin/2022-10-112-java-bindings
           cd ..
           git clone https://github.com/lightningdevkit/ldk-c-bindings
           cd ldk-c-bindings
-          git checkout 0.0.111
+          git checkout 0.0.112
       - name: Rebuild C bindings, and check the sample app builds + links
         run: |
           cd ldk-c-bindings
@@ -288,11 +288,11 @@ jobs:
           # Note this is a different endpoint, as we need one non-upstream commit!
           git clone https://git.bitcoin.ninja/rust-lightning
           cd rust-lightning
-          git checkout origin/2022-09-111-java-bindings
+          git checkout origin/2022-10-112-java-bindings
           cd ..
           git clone https://github.com/lightningdevkit/ldk-c-bindings
           cd ldk-c-bindings
-          git checkout 0.0.111
+          git checkout 0.0.112
       - name: Checkout Android AAR binaries and artifacts
         run: |
           # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
@@ -368,11 +368,11 @@ jobs:
           # Note this is a different endpoint, as we need one non-upstream commit!
           git clone https://git.bitcoin.ninja/rust-lightning
           cd rust-lightning
-          git checkout origin/2022-09-111-java-bindings
+          git checkout origin/2022-10-112-java-bindings
           cd ..
           git clone https://github.com/lightningdevkit/ldk-c-bindings
           cd ldk-c-bindings
-          git checkout 0.0.111
+          git checkout 0.0.112
       - name: Rebuild C bindings with upstream clang, and check the sample app builds + links
         run: |
           export PATH=`pwd`/clang+llvm-14.0.5-x86_64-apple-darwin/bin:$PATH
index 647bd959575ad7fac849d448853cf7c0a5db1bf9..583ddc11498d42c0cf24fc1ec9d8a562a684bb50 100644 (file)
@@ -190,10 +190,19 @@ class TypeMappingGenerator:
                 if subty.to_hu_conv is not None:
                     to_hu_conv = self.consts.var_decl_statement(self.consts.c_type_map["uint32_t"][0], conv_name + "_len", self.consts.get_java_arr_len(arr_name)) + ";\n"
                     to_hu_conv += self.consts.var_decl_statement(ty_info.java_hu_ty, conv_name + "_arr", self.consts.constr_hu_array(ty_info, conv_name + "_len"))
-                    to_hu_conv += ";\n" + self.consts.for_n_in_range(idxc, "0", conv_name + "_len") + "\n"
-                    to_hu_conv += "\t" + self.consts.var_decl_statement(subty.java_ty, conv_name, self.consts.get_java_arr_elem(subty, arr_name, idxc)) + ";\n"
-                    to_hu_conv += "\t" + subty.to_hu_conv.replace("\n", "\n\t") + "\n"
-                    to_hu_conv += "\t" + conv_name + "_arr[" + idxc + "] = " + subty.to_hu_conv_name + ";\n}"
+                    to_hu_conv += ";\n"
+                    pfx = ""
+                    if is_nullable:
+                        to_hu_conv += "if (" + arr_name + " != null) {\n"
+                        pfx = "\t"
+                    to_hu_conv += pfx + self.consts.for_n_in_range(idxc, "0", conv_name + "_len") + "\n"
+
+                    to_hu_conv += pfx + "\t" + self.consts.var_decl_statement(subty.java_ty, conv_name, self.consts.get_java_arr_elem(subty, arr_name, idxc)) + ";\n"
+                    to_hu_conv += pfx + "\t" + subty.to_hu_conv.replace("\n", "\n\t" + pfx) + "\n"
+                    to_hu_conv += pfx + "\t" + conv_name + "_arr[" + idxc + "] = " + subty.to_hu_conv_name + ";\n"
+                    to_hu_conv += pfx + "}"
+                    if is_nullable:
+                        to_hu_conv += "\n}"
                     cleanup = self.consts.cleanup_converted_native_array(ty_info, arr_name)
                     if cleanup is not None:
                         to_hu_conv += "\n" + cleanup
@@ -209,7 +218,10 @@ class TypeMappingGenerator:
                     hu_conv_b = ""
                     if subty.from_hu_conv[1] != "":
                         iterator = self.consts.for_n_in_arr(conv_name, arr_name, subty)
-                        hu_conv_b = iterator[0] + subty.from_hu_conv[1] + ";" + iterator[1]
+                        if is_nullable:
+                            hu_conv_b = "if (" + arr_name + " != null) { " + iterator[0] + subty.from_hu_conv[1] + ";" + iterator[1] + " }"
+                        else:
+                            hu_conv_b = iterator[0] + subty.from_hu_conv[1] + ";" + iterator[1]
                     if from_hu_conv is not None:
                         arr_conv = self.consts.primitive_arr_from_hu(ty_info.subty, None, self.consts.map_hu_array_elems(arr_name, conv_name, ty_info, subty))
                         assert arr_conv[1] == ""
index 487df5d612d66475eca01cc196b342147052262c..b2a9d853767ef03ddd8401753849c567ad92f6f1 100644 (file)
@@ -1013,8 +1013,8 @@ import javax.annotation.Nullable;
                 if fn_line.ret_ty_info.c_ty.endswith("Array"):
                     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 fn_line.ret_ty_info.c_ty == "void":
-                    out_c += "\t(*env)->Call" + fn_line.ret_ty_info.java_ty.title() + "Method(env, obj, j_calls->" + fn_line.fn_name + "_meth"
-                elif fn_line.ret_ty_info.java_hu_ty == "String":
+                    out_c += "\t(*env)->CallVoidMethod(env, obj, j_calls->" + fn_line.fn_name + "_meth"
+                elif fn_line.ret_ty_info.java_hu_ty == "String" or "org/ldk/enums" in fn_line.ret_ty_info.java_fn_ty_arg:
                     # Manually write out String methods as they're just an Object
                     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:
index 86b6b3a2af9f1871fc5bfe6329da68f647fa0a9a..e641ec1a8d7acb88f0537e6ed2a495e77b589e25 100644 (file)
@@ -27,7 +27,7 @@ const chan_handler = ldk.ErroringMessageHandler.constructor_new().as_ChannelMess
 const cust_handler = ldk.IgnoringMessageHandler.constructor_new().as_CustomMessageHandler();
 const onion_handler = ldk.IgnoringMessageHandler.constructor_new().as_OnionMessageHandler();
 
-const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_a_secret, 0xdeadbeefn, rng_seed, logger_a, cust_handler);
+const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_a_secret, 0xdeadbeef, rng_seed, logger_a, cust_handler);
 const a_net_handler = new node_net.NodeLDKNet(a_pm);
 var port = 10000;
 for (; port < 11000; port++) {
@@ -38,7 +38,7 @@ for (; port < 11000; port++) {
        } catch(_) {}
 }
 
-const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_b_secret, 0xdeadbeefn, rng_seed, logger_b, cust_handler);
+const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_b_secret, 0xdeadbeef, rng_seed, logger_b, cust_handler);
 const b_net_handler = new node_net.NodeLDKNet(b_pm);
 await b_net_handler.connect_peer("127.0.0.1", port, node_a_pk);
 
index dc1cee48b25bd3e07aaea0658f420804509a0edd..07994d5f98a53fb7866d8037a522442e3e1580e1 100644 (file)
@@ -132,7 +132,7 @@ public class ChannelManagerConstructor {
                     graph_msg_handler.as_RoutingMessageHandler(),
                     ignoring_handler.as_OnionMessageHandler(),
                     ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res,
-                    System.currentTimeMillis() / 1000,
+                    (int)(System.currentTimeMillis() / 1000),
                     random_data, logger, ignoring_handler.as_CustomMessageHandler());
         } else {
             this.graph_msg_handler = null;
@@ -140,7 +140,7 @@ public class ChannelManagerConstructor {
                     ignoring_handler.as_RoutingMessageHandler(),
                     ignoring_handler.as_OnionMessageHandler(),
                     ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res,
-                    System.currentTimeMillis() / 1000,
+                    (int)(System.currentTimeMillis() / 1000),
                     random_data, logger, ignoring_handler.as_CustomMessageHandler());
         }
         NioPeerHandler nio_peer_handler = null;
@@ -184,7 +184,7 @@ public class ChannelManagerConstructor {
                     graph_msg_handler.as_RoutingMessageHandler(),
                     ignoring_handler.as_OnionMessageHandler(),
                     ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res,
-                    System.currentTimeMillis() / 1000,
+                    (int)(System.currentTimeMillis() / 1000),
                     random_data, logger, ignoring_handler.as_CustomMessageHandler());
         } else {
             this.graph_msg_handler = null;
@@ -192,7 +192,7 @@ public class ChannelManagerConstructor {
                     ignoring_handler.as_RoutingMessageHandler(),
                     ignoring_handler.as_OnionMessageHandler(),
                     ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res,
-                    System.currentTimeMillis() / 1000,
+                    (int)(System.currentTimeMillis() / 1000),
                     random_data, logger, ignoring_handler.as_CustomMessageHandler());
         }
         NioPeerHandler nio_peer_handler = null;
diff --git a/src/main/java/org/ldk/enums/ChannelMonitorUpdateErr.java b/src/main/java/org/ldk/enums/ChannelMonitorUpdateErr.java
deleted file mode 100644 (file)
index 55c551e..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.ldk.enums;
-
-/**
- * An error enum representing a failure to persist a channel monitor update.
- */
-public enum ChannelMonitorUpdateErr {
-       /**
-        * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
-        * our state failed, but is expected to succeed at some point in the future).
-        * 
-        * Such a failure will \"freeze\" a channel, preventing us from revoking old states or
-        * submitting new commitment transactions to the counterparty. Once the update(s) that failed
-        * have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
-        * via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
-        * operational state.
-        * 
-        * Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
-        * you return a TemporaryFailure you must ensure that it is written to disk safely before
-        * writing out the latest ChannelManager state.
-        * 
-        * Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
-        * (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
-        * to claim it on this channel) and those updates must be applied wherever they can be. At
-        * least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
-        * be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
-        * the channel which would invalidate previous ChannelMonitors are not made when a channel has
-        * been \"frozen\".
-        * 
-        * Note that even if updates made after TemporaryFailure succeed you must still provide a
-        * [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
-        * normal channel operation. Note that this is normally generated through a call to
-        * [`ChainMonitor::channel_monitor_updated`].
-        * 
-        * Note that the update being processed here will not be replayed for you when you return a
-        * [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
-        * you must store the update itself on your own local disk prior to returning a
-        * TemporaryFailure. You may, of course, employ a journaling approach, storing only the
-        * ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
-        * reload-time.
-        * 
-        * For deployments where a copy of ChannelMonitors and other local state are backed up in a
-        * remote location (with local copies persisted immediately), it is anticipated that all
-        * updates will return TemporaryFailure until the remote copies could be updated.
-        * 
-        * [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
-        */
-       LDKChannelMonitorUpdateErr_TemporaryFailure,
-       /**
-        * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
-        * different watchtower and cannot update with all watchtowers that were previously informed
-        * of this channel).
-        * 
-        * At reception of this error, ChannelManager will force-close the channel and return at
-        * least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
-        * least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
-        * update must be rejected.
-        * 
-        * This failure may also signal a failure to update the local persisted copy of one of
-        * the channel monitor instance.
-        * 
-        * Note that even when you fail a holder commitment transaction update, you must store the
-        * update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
-        * broadcasts it (e.g distributed channel-monitor deployment)
-        * 
-        * In case of distributed watchtowers deployment, the new version must be written to disk, as
-        * state may have been stored but rejected due to a block forcing a commitment broadcast. This
-        * storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
-        * lagging behind on block processing.
-        */
-       LDKChannelMonitorUpdateErr_PermanentFailure,
-       ; static native void init();
-       static { init(); }
-}
\ No newline at end of file
diff --git a/src/main/java/org/ldk/enums/ChannelMonitorUpdateStatus.java b/src/main/java/org/ldk/enums/ChannelMonitorUpdateStatus.java
new file mode 100644 (file)
index 0000000..ac7d3f8
--- /dev/null
@@ -0,0 +1,88 @@
+package org.ldk.enums;
+
+/**
+ * An enum representing the status of a channel monitor update persistence.
+ */
+public enum ChannelMonitorUpdateStatus {
+       /**
+        * The update has been durably persisted and all copies of the relevant [`ChannelMonitor`]
+        * have been updated.
+        * 
+        * This includes performing any `fsync()` calls required to ensure the update is guaranteed to
+        * be available on restart even if the application crashes.
+        */
+       LDKChannelMonitorUpdateStatus_Completed,
+       /**
+        * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
+        * our state failed, but is expected to succeed at some point in the future).
+        * 
+        * Such a failure will \"freeze\" a channel, preventing us from revoking old states or
+        * submitting new commitment transactions to the counterparty. Once the update(s) which failed
+        * have been successfully applied, a [`MonitorEvent::Completed`] can be used to restore the
+        * channel to an operational state.
+        * 
+        * Note that a given [`ChannelManager`] will *never* re-generate a [`ChannelMonitorUpdate`].
+        * If you return this error you must ensure that it is written to disk safely before writing
+        * the latest [`ChannelManager`] state, or you should return [`PermanentFailure`] instead.
+        * 
+        * Even when a channel has been \"frozen\", updates to the [`ChannelMonitor`] can continue to
+        * occur (e.g. if an inbound HTLC which we forwarded was claimed upstream, resulting in us
+        * attempting to claim it on this channel) and those updates must still be persisted.
+        * 
+        * No updates to the channel will be made which could invalidate other [`ChannelMonitor`]s
+        * until a [`MonitorEvent::Completed`] is provided, even if you return no error on a later
+        * monitor update for the same channel.
+        * 
+        * For deployments where a copy of ChannelMonitors and other local state are backed up in a
+        * remote location (with local copies persisted immediately), it is anticipated that all
+        * updates will return [`InProgress`] until the remote copies could be updated.
+        * 
+        * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+        * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
+        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+        */
+       LDKChannelMonitorUpdateStatus_InProgress,
+       /**
+        * Used to indicate no further channel monitor updates will be allowed (likely a disk failure
+        * or a remote copy of this [`ChannelMonitor`] is no longer reachable and thus not updatable).
+        * 
+        * When this is returned, [`ChannelManager`] will force-close the channel but *not* broadcast
+        * our current commitment transaction. This avoids a dangerous case where a local disk failure
+        * (e.g. the Linux-default remounting of the disk as read-only) causes [`PermanentFailure`]s
+        * for all monitor updates. If we were to broadcast our latest commitment transaction and then
+        * restart, we could end up reading a previous [`ChannelMonitor`] and [`ChannelManager`],
+        * revoking our now-broadcasted state before seeing it confirm and losing all our funds.
+        * 
+        * Note that this is somewhat of a tradeoff - if the disk is really gone and we may have lost
+        * the data permanently, we really should broadcast immediately. If the data can be recovered
+        * with manual intervention, we'd rather close the channel, rejecting future updates to it,
+        * and broadcast the latest state only if we have HTLCs to claim which are timing out (which
+        * we do as long as blocks are connected).
+        * 
+        * In order to broadcast the latest local commitment transaction, you'll need to call
+        * [`ChannelMonitor::get_latest_holder_commitment_txn`] and broadcast the resulting
+        * transactions once you've safely ensured no further channel updates can be generated by your
+        * [`ChannelManager`].
+        * 
+        * Note that at least one final [`ChannelMonitorUpdate`] may still be provided, which must
+        * still be processed by a running [`ChannelMonitor`]. This final update will mark the
+        * [`ChannelMonitor`] as finalized, ensuring no further updates (e.g. revocation of the latest
+        * commitment transaction) are allowed.
+        * 
+        * Note that even if you return a [`PermanentFailure`] due to unavailability of secondary
+        * [`ChannelMonitor`] copies, you should still make an attempt to store the update where
+        * possible to ensure you can claim HTLC outputs on the latest commitment transaction
+        * broadcasted later.
+        * 
+        * In case of distributed watchtowers deployment, the new version must be written to disk, as
+        * state may have been stored but rejected due to a block forcing a commitment broadcast. This
+        * storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
+        * lagging behind on block processing.
+        * 
+        * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+        */
+       LDKChannelMonitorUpdateStatus_PermanentFailure,
+       ; static native void init();
+       static { init(); }
+}
\ No newline at end of file
index 443a1a42894199c1a494aaa4bb52e87a0c5fba02..5769b78160710b4ed0c3ab335d4fcd2e77dc9289 100644 (file)
@@ -68,7 +68,7 @@ public class bindings {
 
        static { AccessError.values(); /* Force enum statics to run */ }
        static { COption_NoneZ.values(); /* Force enum statics to run */ }
-       static { ChannelMonitorUpdateErr.values(); /* Force enum statics to run */ }
+       static { ChannelMonitorUpdateStatus.values(); /* Force enum statics to run */ }
        static { ConfirmationTarget.values(); /* Force enum statics to run */ }
        static { CreationError.values(); /* Force enum statics to run */ }
        static { Currency.values(); /* Force enum statics to run */ }
@@ -120,6 +120,34 @@ public class bindings {
        public static native long CResult_BlindedRouteNoneZ_get_ok(long owner);
        // void CResult_BlindedRouteNoneZ_get_err(LDKCResult_BlindedRouteNoneZ *NONNULL_PTR owner);
        public static native void CResult_BlindedRouteNoneZ_get_err(long owner);
+       public static class LDKDecodeError {
+               private LDKDecodeError() {}
+               public final static class UnknownVersion extends LDKDecodeError {
+                       UnknownVersion() { }
+               }
+               public final static class UnknownRequiredFeature extends LDKDecodeError {
+                       UnknownRequiredFeature() { }
+               }
+               public final static class InvalidValue extends LDKDecodeError {
+                       InvalidValue() { }
+               }
+               public final static class ShortRead extends LDKDecodeError {
+                       ShortRead() { }
+               }
+               public final static class BadLengthDescriptor extends LDKDecodeError {
+                       BadLengthDescriptor() { }
+               }
+               public final static class Io extends LDKDecodeError {
+                       public org.ldk.enums.IOError io;
+                       Io(org.ldk.enums.IOError io) { this.io = io; }
+               }
+               public final static class UnsupportedCompression extends LDKDecodeError {
+                       UnsupportedCompression() { }
+               }
+               static native void init();
+       }
+       static { LDKDecodeError.init(); }
+       public static native LDKDecodeError LDKDecodeError_ref_from_ptr(long ptr);
        // struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_BlindedRouteDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner);
@@ -728,10 +756,6 @@ public class bindings {
        public static native long C2Tuple_usizeTransactionZ_get_a(long owner);
        // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
        public static native byte[] C2Tuple_usizeTransactionZ_get_b(long owner);
-       // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-       public static native void CResult_NoneChannelMonitorUpdateErrZ_get_ok(long owner);
-       // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-       public static native ChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(long owner);
        public static class LDKMonitorEvent {
                private LDKMonitorEvent() {}
                public final static class HTLCEvent extends LDKMonitorEvent {
@@ -742,10 +766,10 @@ public class bindings {
                        public long commitment_tx_confirmed;
                        CommitmentTxConfirmed(long commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
                }
-               public final static class UpdateCompleted extends LDKMonitorEvent {
+               public final static class Completed extends LDKMonitorEvent {
                        public long funding_txo;
                        public long monitor_update_id;
-                       UpdateCompleted(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
+                       Completed(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
                }
                public final static class UpdateFailed extends LDKMonitorEvent {
                        public long update_failed;
@@ -973,6 +997,10 @@ public class bindings {
        public static native byte[] CResult_SecretKeyNoneZ_get_ok(long owner);
        // void CResult_SecretKeyNoneZ_get_err(LDKCResult_SecretKeyNoneZ *NONNULL_PTR owner);
        public static native void CResult_SecretKeyNoneZ_get_err(long owner);
+       // struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+       public static native byte[] CResult_PublicKeyNoneZ_get_ok(long owner);
+       // void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+       public static native void CResult_PublicKeyNoneZ_get_err(long owner);
        public static class LDKCOption_ScalarZ {
                private LDKCOption_ScalarZ() {}
                public final static class Some extends LDKCOption_ScalarZ {
@@ -1002,6 +1030,7 @@ public class bindings {
                 long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
                 long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
                 long sign_closing_transaction(long closing_tx);
+                long sign_holder_anchor_input(byte[] anchor_tx, long input);
                 long sign_channel_announcement(long msg);
                 void ready_channel(long channel_parameters);
        }
@@ -1028,6 +1057,8 @@ public class bindings {
        public static native long BaseSign_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
        // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
        public static native long BaseSign_sign_closing_transaction(long this_arg, long closing_tx);
+       // LDKCResult_SignatureNoneZ BaseSign_sign_holder_anchor_input LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction anchor_tx, uintptr_t input
+       public static native long BaseSign_sign_holder_anchor_input(long this_arg, byte[] anchor_tx, long input);
        // LDKCResult_C2Tuple_SignatureSignatureZNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
        public static native long BaseSign_sign_channel_announcement(long this_arg, long msg);
        // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
@@ -1101,8 +1132,8 @@ public class bindings {
                        public java.lang.String err;
                        ChannelUnavailable(java.lang.String err) { this.err = err; }
                }
-               public final static class MonitorUpdateFailed extends LDKAPIError {
-                       MonitorUpdateFailed() { }
+               public final static class MonitorUpdateInProgress extends LDKAPIError {
+                       MonitorUpdateInProgress() { }
                }
                public final static class IncompatibleShutdownScript extends LDKAPIError {
                        public long script;
@@ -1201,15 +1232,15 @@ public class bindings {
        // struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_PhantomRouteHintsDecodeErrorZ_get_err(long owner);
        public interface LDKWatch {
-                long watch_channel(long funding_txo, long monitor);
-                long update_channel(long funding_txo, long update);
+                ChannelMonitorUpdateStatus watch_channel(long funding_txo, long monitor);
+                ChannelMonitorUpdateStatus update_channel(long funding_txo, long update);
                 long[] release_pending_monitor_events();
        }
        public static native long LDKWatch_new(LDKWatch impl);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
-       public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
-       public static native long Watch_update_channel(long this_arg, long funding_txo, long update);
+       // LDKChannelMonitorUpdateStatus Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
+       public static native ChannelMonitorUpdateStatus Watch_watch_channel(long this_arg, long funding_txo, long monitor);
+       // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
+       public static native ChannelMonitorUpdateStatus Watch_update_channel(long this_arg, long funding_txo, long update);
        // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
        public static native long[] Watch_release_pending_monitor_events(long this_arg);
        public interface LDKBroadcasterInterface {
@@ -1220,6 +1251,7 @@ public class bindings {
        public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
        public interface LDKKeysInterface {
                 long get_node_secret(Recipient recipient);
+                long get_node_id(Recipient recipient);
                 long ecdh(Recipient recipient, byte[] other_key, long tweak);
                 byte[] get_destination_script();
                 long get_shutdown_scriptpubkey();
@@ -1232,6 +1264,8 @@ public class bindings {
        public static native long LDKKeysInterface_new(LDKKeysInterface impl);
        // LDKCResult_SecretKeyNoneZ KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient
        public static native long KeysInterface_get_node_secret(long this_arg, Recipient recipient);
+       // LDKCResult_PublicKeyNoneZ KeysInterface_get_node_id LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient
+       public static native long KeysInterface_get_node_id(long this_arg, Recipient recipient);
        // LDKCResult_SharedSecretNoneZ KeysInterface_ecdh LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak
        public static native long KeysInterface_ecdh(long this_arg, Recipient recipient, byte[] other_key, long tweak);
        // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
@@ -1537,6 +1571,32 @@ public class bindings {
        public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long owner);
        // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
        public static native long C2Tuple_PublicKeyTypeZ_get_b(long owner);
+       public interface LDKCustomOnionMessageContents {
+                long tlv_type();
+                byte[] write();
+       }
+       public static native long LDKCustomOnionMessageContents_new(LDKCustomOnionMessageContents impl);
+       // uint64_t CustomOnionMessageContents_tlv_type LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+       public static native long CustomOnionMessageContents_tlv_type(long this_arg);
+       // LDKCVec_u8Z CustomOnionMessageContents_write LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+       public static native byte[] CustomOnionMessageContents_write(long this_arg);
+       public static class LDKCOption_CustomOnionMessageContentsZ {
+               private LDKCOption_CustomOnionMessageContentsZ() {}
+               public final static class Some extends LDKCOption_CustomOnionMessageContentsZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_CustomOnionMessageContentsZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_CustomOnionMessageContentsZ.init(); }
+       public static native LDKCOption_CustomOnionMessageContentsZ LDKCOption_CustomOnionMessageContentsZ_ref_from_ptr(long ptr);
+       // struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(long owner);
        public static class LDKCOption_NetAddressZ {
                private LDKCOption_NetAddressZ() {}
                public final static class Some extends LDKCOption_NetAddressZ {
@@ -1577,6 +1637,9 @@ public class bindings {
                public final static class InvalidFirstHop extends LDKSendError {
                        InvalidFirstHop() { }
                }
+               public final static class InvalidMessage extends LDKSendError {
+                       InvalidMessage() { }
+               }
                public final static class BufferFull extends LDKSendError {
                        BufferFull() { }
                }
@@ -1859,14 +1922,14 @@ public class bindings {
        // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
        public static native byte[][] Confirm_get_relevant_txids(long this_arg);
        public interface LDKPersist {
-                long persist_new_channel(long channel_id, long data, long update_id);
-                long update_persisted_channel(long channel_id, long update, long data, long update_id);
+                ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id);
+                ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id);
        }
        public static native long LDKPersist_new(LDKPersist impl);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
-       public static native long Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
-       public static native long Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
+       // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
+       // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
        public interface LDKChannelMessageHandler {
                 void handle_open_channel(byte[] their_node_id, long their_features, long msg);
                 void handle_accept_channel(byte[] their_node_id, long their_features, long msg);
@@ -1884,7 +1947,7 @@ public class bindings {
                 void handle_update_fee(byte[] their_node_id, long msg);
                 void handle_announcement_signatures(byte[] their_node_id, long msg);
                 void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
-                void peer_connected(byte[] their_node_id, long msg);
+                long peer_connected(byte[] their_node_id, long msg);
                 void handle_channel_reestablish(byte[] their_node_id, long msg);
                 void handle_channel_update(byte[] their_node_id, long msg);
                 void handle_error(byte[] their_node_id, long msg);
@@ -1925,8 +1988,8 @@ public class bindings {
        public static native void ChannelMessageHandler_handle_announcement_signatures(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
        public static native void ChannelMessageHandler_peer_disconnected(long this_arg, byte[] their_node_id, boolean no_connection_possible);
-       // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
-       public static native void ChannelMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long msg);
+       // LDKCResult_NoneNoneZ ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
+       public static native long ChannelMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_channel_reestablish(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
@@ -1943,7 +2006,7 @@ public class bindings {
                 long handle_channel_update(long msg);
                 long get_next_channel_announcement(long starting_point);
                 long get_next_node_announcement(byte[] starting_point);
-                void peer_connected(byte[] their_node_id, long init);
+                long peer_connected(byte[] their_node_id, long init);
                 long handle_reply_channel_range(byte[] their_node_id, long msg);
                 long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg);
                 long handle_query_channel_range(byte[] their_node_id, long msg);
@@ -1963,8 +2026,8 @@ public class bindings {
        public static native long RoutingMessageHandler_get_next_channel_announcement(long this_arg, long starting_point);
        // LDKNodeAnnouncement RoutingMessageHandler_get_next_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point
        public static native long RoutingMessageHandler_get_next_node_announcement(long this_arg, byte[] starting_point);
-       // void RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
-       public static native void RoutingMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long init);
+       // LDKCResult_NoneNoneZ RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+       public static native long RoutingMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long init);
        // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
        public static native long RoutingMessageHandler_handle_reply_channel_range(long this_arg, byte[] their_node_id, long msg);
        // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
@@ -1979,7 +2042,7 @@ public class bindings {
        public static native long RoutingMessageHandler_provided_init_features(long this_arg, byte[] their_node_id);
        public interface LDKOnionMessageHandler {
                 void handle_onion_message(byte[] peer_node_id, long msg);
-                void peer_connected(byte[] their_node_id, long init);
+                long peer_connected(byte[] their_node_id, long init);
                 void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
                 long provided_node_features();
                 long provided_init_features(byte[] their_node_id);
@@ -1988,8 +2051,8 @@ public class bindings {
        public static native long LDKOnionMessageHandler_get_OnionMessageProvider(long arg);
        // void OnionMessageHandler_handle_onion_message LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey peer_node_id, const struct LDKOnionMessage *NONNULL_PTR msg
        public static native void OnionMessageHandler_handle_onion_message(long this_arg, byte[] peer_node_id, long msg);
-       // void OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
-       public static native void OnionMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long init);
+       // LDKCResult_NoneNoneZ OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+       public static native long OnionMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long init);
        // void OnionMessageHandler_peer_disconnected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
        public static native void OnionMessageHandler_peer_disconnected(long this_arg, byte[] their_node_id, boolean no_connection_possible);
        // LDKNodeFeatures OnionMessageHandler_provided_node_features LDKOnionMessageHandler *NONNULL_PTR this_arg
@@ -2012,6 +2075,15 @@ public class bindings {
        public static native long CustomMessageHandler_handle_custom_message(long this_arg, long msg, byte[] sender_node_id);
        // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
        public static native long[] CustomMessageHandler_get_and_clear_pending_msg(long this_arg);
+       public interface LDKCustomOnionMessageHandler {
+                void handle_custom_message(long msg);
+                long read_custom_message(long message_type, byte[] buffer);
+       }
+       public static native long LDKCustomOnionMessageHandler_new(LDKCustomOnionMessageHandler impl);
+       // void CustomOnionMessageHandler_handle_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, struct LDKCustomOnionMessageContents msg
+       public static native void CustomOnionMessageHandler_handle_custom_message(long this_arg, long msg);
+       // LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CustomOnionMessageHandler_read_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, uint64_t message_type, struct LDKu8slice buffer
+       public static native long CustomOnionMessageHandler_read_custom_message(long this_arg, long message_type, byte[] buffer);
        public interface LDKSocketDescriptor {
                 long send_data(byte[] data, boolean resume_read);
                 void disconnect_socket();
@@ -2669,18 +2741,6 @@ public class bindings {
        public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
        // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
        public static native void CVec_TxidZ_free(byte[][] _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(ChannelMonitorUpdateErr e);
-       // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
-       public static native boolean CResult_NoneChannelMonitorUpdateErrZ_is_ok(long o);
-       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-       public static native void CResult_NoneChannelMonitorUpdateErrZ_free(long _res);
-       // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
-       public static native long CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(long arg);
-       // 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);
        // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
@@ -3059,6 +3119,18 @@ public class bindings {
        public static native long CResult_SecretKeyNoneZ_clone_ptr(long arg);
        // struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_clone(const struct LDKCResult_SecretKeyNoneZ *NONNULL_PTR orig);
        public static native long CResult_SecretKeyNoneZ_clone(long orig);
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_ok(struct LDKPublicKey o);
+       public static native long CResult_PublicKeyNoneZ_ok(byte[] o);
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_err(void);
+       public static native long CResult_PublicKeyNoneZ_err();
+       // bool CResult_PublicKeyNoneZ_is_ok(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR o);
+       public static native boolean CResult_PublicKeyNoneZ_is_ok(long o);
+       // void CResult_PublicKeyNoneZ_free(struct LDKCResult_PublicKeyNoneZ _res);
+       public static native void CResult_PublicKeyNoneZ_free(long _res);
+       // uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg);
+       public static native long CResult_PublicKeyNoneZ_clone_ptr(long arg);
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_clone(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR orig);
+       public static native long CResult_PublicKeyNoneZ_clone(long orig);
        // struct LDKCOption_ScalarZ COption_ScalarZ_some(struct LDKBigEndianScalar o);
        public static native long COption_ScalarZ_some(long o);
        // struct LDKCOption_ScalarZ COption_ScalarZ_none(void);
@@ -3699,6 +3771,28 @@ public class bindings {
        public static native void C2Tuple_PublicKeyTypeZ_free(long _res);
        // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
        public static native void CVec_C2Tuple_PublicKeyTypeZZ_free(long[] _res);
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_some(struct LDKCustomOnionMessageContents o);
+       public static native long COption_CustomOnionMessageContentsZ_some(long o);
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_none(void);
+       public static native long COption_CustomOnionMessageContentsZ_none();
+       // void COption_CustomOnionMessageContentsZ_free(struct LDKCOption_CustomOnionMessageContentsZ _res);
+       public static native void COption_CustomOnionMessageContentsZ_free(long _res);
+       // uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg);
+       public static native long COption_CustomOnionMessageContentsZ_clone_ptr(long arg);
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_clone(const struct LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR orig);
+       public static native long COption_CustomOnionMessageContentsZ_clone(long orig);
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(struct LDKCOption_CustomOnionMessageContentsZ o);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(long o);
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(long e);
+       // bool CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(long o);
+       // void CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res);
+       public static native void CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(long _res);
+       // uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(long orig);
        // struct LDKCOption_NetAddressZ COption_NetAddressZ_some(struct LDKNetAddress o);
        public static native long COption_NetAddressZ_some(long o);
        // struct LDKCOption_NetAddressZ COption_NetAddressZ_none(void);
@@ -4255,6 +4349,8 @@ public class bindings {
        public static native long ClosureReason_disconnected_peer();
        // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
        public static native long ClosureReason_outdated_channel_manager();
+       // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
+       public static native boolean ClosureReason_eq(long a, long b);
        // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
        public static native byte[] ClosureReason_write(long obj);
        // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
@@ -4271,6 +4367,8 @@ public class bindings {
        public static native long HTLCDestination_unknown_next_hop(long requested_forward_scid);
        // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
        public static native long HTLCDestination_failed_payment(byte[] payment_hash);
+       // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
+       public static native boolean HTLCDestination_eq(long a, long b);
        // struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
        public static native byte[] HTLCDestination_write(long obj);
        // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ HTLCDestination_read(struct LDKu8slice ser);
@@ -4385,10 +4483,12 @@ public class bindings {
        public static native long APIError_route_error(String err);
        // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
        public static native long APIError_channel_unavailable(String err);
-       // struct LDKAPIError APIError_monitor_update_failed(void);
-       public static native long APIError_monitor_update_failed();
+       // struct LDKAPIError APIError_monitor_update_in_progress(void);
+       public static native long APIError_monitor_update_in_progress();
        // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
        public static native long APIError_incompatible_shutdown_script(long script);
+       // bool APIError_eq(const struct LDKAPIError *NONNULL_PTR a, const struct LDKAPIError *NONNULL_PTR b);
+       public static native boolean APIError_eq(long a, long b);
        // void BigSize_free(struct LDKBigSize this_obj);
        public static native void BigSize_free(long this_obj);
        // uint64_t BigSize_get_a(const struct LDKBigSize *NONNULL_PTR this_ptr);
@@ -4403,6 +4503,8 @@ public class bindings {
        public static native long Hostname_clone_ptr(long arg);
        // struct LDKHostname Hostname_clone(const struct LDKHostname *NONNULL_PTR orig);
        public static native long Hostname_clone(long orig);
+       // bool Hostname_eq(const struct LDKHostname *NONNULL_PTR a, const struct LDKHostname *NONNULL_PTR b);
+       public static native boolean Hostname_eq(long a, long b);
        // MUST_USE_RES uint8_t Hostname_len(const struct LDKHostname *NONNULL_PTR this_arg);
        public static native byte Hostname_len(long this_arg);
        // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
@@ -4589,6 +4691,8 @@ public class bindings {
        public static native long ChannelConfig_clone_ptr(long arg);
        // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
        public static native long ChannelConfig_clone(long orig);
+       // bool ChannelConfig_eq(const struct LDKChannelConfig *NONNULL_PTR a, const struct LDKChannelConfig *NONNULL_PTR b);
+       public static native boolean ChannelConfig_eq(long a, long b);
        // 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);
@@ -4635,6 +4739,8 @@ public class bindings {
        public static native long BestBlock_clone_ptr(long arg);
        // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
        public static native long BestBlock_clone(long orig);
+       // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b);
+       public static native boolean BestBlock_eq(long a, long b);
        // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
        public static native long BestBlock_from_genesis(Network network);
        // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
@@ -4655,12 +4761,16 @@ public class bindings {
        public static native void Listen_free(long this_ptr);
        // void Confirm_free(struct LDKConfirm this_ptr);
        public static native void Confirm_free(long this_ptr);
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
-       public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(long orig);
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
-       public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure();
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
-       public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure();
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_clone(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR orig);
+       public static native ChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_clone(long orig);
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_completed(void);
+       public static native ChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_completed();
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_in_progress(void);
+       public static native ChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_in_progress();
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_permanent_failure(void);
+       public static native ChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_permanent_failure();
+       // bool ChannelMonitorUpdateStatus_eq(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR a, const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR b);
+       public static native boolean ChannelMonitorUpdateStatus_eq(long a, long b);
        // void Watch_free(struct LDKWatch this_ptr);
        public static native void Watch_free(long this_ptr);
        // void Filter_free(struct LDKFilter this_ptr);
@@ -4685,6 +4795,8 @@ public class bindings {
        public static native long WatchedOutput_clone_ptr(long arg);
        // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
        public static native long WatchedOutput_clone(long orig);
+       // bool WatchedOutput_eq(const struct LDKWatchedOutput *NONNULL_PTR a, const struct LDKWatchedOutput *NONNULL_PTR b);
+       public static native boolean WatchedOutput_eq(long a, long b);
        // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
        public static native long WatchedOutput_hash(long o);
        // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
@@ -4759,10 +4871,12 @@ public class bindings {
        public static native long MonitorEvent_htlcevent(long a);
        // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
        public static native long MonitorEvent_commitment_tx_confirmed(long a);
-       // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
-       public static native long MonitorEvent_update_completed(long funding_txo, long monitor_update_id);
+       // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
+       public static native long MonitorEvent_completed(long funding_txo, long monitor_update_id);
        // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
        public static native long MonitorEvent_update_failed(long a);
+       // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b);
+       public static native boolean MonitorEvent_eq(long a, long b);
        // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
        public static native byte[] MonitorEvent_write(long obj);
        // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
@@ -4773,6 +4887,8 @@ public class bindings {
        public static native long HTLCUpdate_clone_ptr(long arg);
        // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
        public static native long HTLCUpdate_clone(long orig);
+       // bool HTLCUpdate_eq(const struct LDKHTLCUpdate *NONNULL_PTR a, const struct LDKHTLCUpdate *NONNULL_PTR b);
+       public static native boolean HTLCUpdate_eq(long a, long b);
        // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
        public static native byte[] HTLCUpdate_write(long obj);
        // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
@@ -4903,6 +5019,8 @@ public class bindings {
        public static native long DelayedPaymentOutputDescriptor_clone_ptr(long arg);
        // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
        public static native long DelayedPaymentOutputDescriptor_clone(long orig);
+       // bool DelayedPaymentOutputDescriptor_eq(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR b);
+       public static native boolean DelayedPaymentOutputDescriptor_eq(long a, long b);
        // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
        public static native byte[] DelayedPaymentOutputDescriptor_write(long obj);
        // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
@@ -4931,6 +5049,8 @@ public class bindings {
        public static native long StaticPaymentOutputDescriptor_clone_ptr(long arg);
        // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
        public static native long StaticPaymentOutputDescriptor_clone(long orig);
+       // bool StaticPaymentOutputDescriptor_eq(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR b);
+       public static native boolean StaticPaymentOutputDescriptor_eq(long a, long b);
        // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
        public static native byte[] StaticPaymentOutputDescriptor_write(long obj);
        // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
@@ -4947,6 +5067,8 @@ public class bindings {
        public static native long SpendableOutputDescriptor_delayed_payment_output(long a);
        // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
        public static native long SpendableOutputDescriptor_static_payment_output(long a);
+       // bool SpendableOutputDescriptor_eq(const struct LDKSpendableOutputDescriptor *NONNULL_PTR a, const struct LDKSpendableOutputDescriptor *NONNULL_PTR b);
+       public static native boolean SpendableOutputDescriptor_eq(long a, long b);
        // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
        public static native byte[] SpendableOutputDescriptor_write(long obj);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
@@ -5335,6 +5457,12 @@ public class bindings {
        public static native long ChannelManager_current_best_block(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 LDKNodeFeatures provided_node_features(void);
+       public static native long provided_node_features();
+       // struct LDKChannelFeatures provided_channel_features(void);
+       public static native long provided_channel_features();
+       // struct LDKInitFeatures provided_init_features(void);
+       public static native long provided_init_features();
        // struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj);
        public static native byte[] CounterpartyForwardingInfo_write(long obj);
        // struct LDKCResult_CounterpartyForwardingInfoDecodeErrorZ CounterpartyForwardingInfo_read(struct LDKu8slice ser);
@@ -5391,12 +5519,28 @@ public class bindings {
        public static native long create(long keys, long min_value_msat, int invoice_expiry_delta_secs, long keys_manager, long current_time);
        // struct LDKCResult_PaymentSecretNoneZ create_from_hash(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, struct LDKThirtyTwoBytes payment_hash, uint32_t invoice_expiry_delta_secs, uint64_t current_time);
        public static native long create_from_hash(long keys, long min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time);
-       // void DecodeError_free(struct LDKDecodeError this_obj);
-       public static native void DecodeError_free(long this_obj);
+       // void DecodeError_free(struct LDKDecodeError this_ptr);
+       public static native void DecodeError_free(long this_ptr);
        // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
        public static native long DecodeError_clone_ptr(long arg);
        // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
        public static native long DecodeError_clone(long orig);
+       // struct LDKDecodeError DecodeError_unknown_version(void);
+       public static native long DecodeError_unknown_version();
+       // struct LDKDecodeError DecodeError_unknown_required_feature(void);
+       public static native long DecodeError_unknown_required_feature();
+       // struct LDKDecodeError DecodeError_invalid_value(void);
+       public static native long DecodeError_invalid_value();
+       // struct LDKDecodeError DecodeError_short_read(void);
+       public static native long DecodeError_short_read();
+       // struct LDKDecodeError DecodeError_bad_length_descriptor(void);
+       public static native long DecodeError_bad_length_descriptor();
+       // struct LDKDecodeError DecodeError_io(enum LDKIOError a);
+       public static native long DecodeError_io(IOError a);
+       // struct LDKDecodeError DecodeError_unsupported_compression(void);
+       public static native long DecodeError_unsupported_compression();
+       // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b);
+       public static native boolean DecodeError_eq(long a, long b);
        // void Init_free(struct LDKInit this_obj);
        public static native void Init_free(long this_obj);
        // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
@@ -5413,6 +5557,8 @@ public class bindings {
        public static native long Init_clone_ptr(long arg);
        // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
        public static native long Init_clone(long orig);
+       // bool Init_eq(const struct LDKInit *NONNULL_PTR a, const struct LDKInit *NONNULL_PTR b);
+       public static native boolean Init_eq(long a, long b);
        // void ErrorMessage_free(struct LDKErrorMessage this_obj);
        public static native void ErrorMessage_free(long this_obj);
        // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
@@ -5429,6 +5575,8 @@ public class bindings {
        public static native long ErrorMessage_clone_ptr(long arg);
        // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
        public static native long ErrorMessage_clone(long orig);
+       // bool ErrorMessage_eq(const struct LDKErrorMessage *NONNULL_PTR a, const struct LDKErrorMessage *NONNULL_PTR b);
+       public static native boolean ErrorMessage_eq(long a, long b);
        // void WarningMessage_free(struct LDKWarningMessage this_obj);
        public static native void WarningMessage_free(long this_obj);
        // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32];
@@ -5445,6 +5593,8 @@ public class bindings {
        public static native long WarningMessage_clone_ptr(long arg);
        // struct LDKWarningMessage WarningMessage_clone(const struct LDKWarningMessage *NONNULL_PTR orig);
        public static native long WarningMessage_clone(long orig);
+       // bool WarningMessage_eq(const struct LDKWarningMessage *NONNULL_PTR a, const struct LDKWarningMessage *NONNULL_PTR b);
+       public static native boolean WarningMessage_eq(long a, long b);
        // void Ping_free(struct LDKPing this_obj);
        public static native void Ping_free(long this_obj);
        // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
@@ -5461,6 +5611,8 @@ public class bindings {
        public static native long Ping_clone_ptr(long arg);
        // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
        public static native long Ping_clone(long orig);
+       // bool Ping_eq(const struct LDKPing *NONNULL_PTR a, const struct LDKPing *NONNULL_PTR b);
+       public static native boolean Ping_eq(long a, long b);
        // void Pong_free(struct LDKPong this_obj);
        public static native void Pong_free(long this_obj);
        // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
@@ -5473,6 +5625,8 @@ public class bindings {
        public static native long Pong_clone_ptr(long arg);
        // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
        public static native long Pong_clone(long orig);
+       // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
+       public static native boolean Pong_eq(long a, long b);
        // void OpenChannel_free(struct LDKOpenChannel this_obj);
        public static native void OpenChannel_free(long this_obj);
        // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
@@ -5555,6 +5709,8 @@ public class bindings {
        public static native long OpenChannel_clone_ptr(long arg);
        // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
        public static native long OpenChannel_clone(long orig);
+       // bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b);
+       public static native boolean OpenChannel_eq(long a, long b);
        // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
        public static native void AcceptChannel_free(long this_obj);
        // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
@@ -5621,6 +5777,8 @@ public class bindings {
        public static native long AcceptChannel_clone_ptr(long arg);
        // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
        public static native long AcceptChannel_clone(long orig);
+       // bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct LDKAcceptChannel *NONNULL_PTR b);
+       public static native boolean AcceptChannel_eq(long a, long b);
        // void FundingCreated_free(struct LDKFundingCreated this_obj);
        public static native void FundingCreated_free(long this_obj);
        // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
@@ -5645,6 +5803,8 @@ public class bindings {
        public static native long FundingCreated_clone_ptr(long arg);
        // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
        public static native long FundingCreated_clone(long orig);
+       // bool FundingCreated_eq(const struct LDKFundingCreated *NONNULL_PTR a, const struct LDKFundingCreated *NONNULL_PTR b);
+       public static native boolean FundingCreated_eq(long a, long b);
        // void FundingSigned_free(struct LDKFundingSigned this_obj);
        public static native void FundingSigned_free(long this_obj);
        // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
@@ -5661,6 +5821,8 @@ public class bindings {
        public static native long FundingSigned_clone_ptr(long arg);
        // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
        public static native long FundingSigned_clone(long orig);
+       // bool FundingSigned_eq(const struct LDKFundingSigned *NONNULL_PTR a, const struct LDKFundingSigned *NONNULL_PTR b);
+       public static native boolean FundingSigned_eq(long a, long b);
        // void ChannelReady_free(struct LDKChannelReady this_obj);
        public static native void ChannelReady_free(long this_obj);
        // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32];
@@ -5681,6 +5843,8 @@ public class bindings {
        public static native long ChannelReady_clone_ptr(long arg);
        // struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig);
        public static native long ChannelReady_clone(long orig);
+       // bool ChannelReady_eq(const struct LDKChannelReady *NONNULL_PTR a, const struct LDKChannelReady *NONNULL_PTR b);
+       public static native boolean ChannelReady_eq(long a, long b);
        // void Shutdown_free(struct LDKShutdown this_obj);
        public static native void Shutdown_free(long this_obj);
        // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
@@ -5697,6 +5861,8 @@ public class bindings {
        public static native long Shutdown_clone_ptr(long arg);
        // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
        public static native long Shutdown_clone(long orig);
+       // bool Shutdown_eq(const struct LDKShutdown *NONNULL_PTR a, const struct LDKShutdown *NONNULL_PTR b);
+       public static native boolean Shutdown_eq(long a, long b);
        // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
        public static native void ClosingSignedFeeRange_free(long this_obj);
        // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
@@ -5713,6 +5879,8 @@ public class bindings {
        public static native long ClosingSignedFeeRange_clone_ptr(long arg);
        // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
        public static native long ClosingSignedFeeRange_clone(long orig);
+       // bool ClosingSignedFeeRange_eq(const struct LDKClosingSignedFeeRange *NONNULL_PTR a, const struct LDKClosingSignedFeeRange *NONNULL_PTR b);
+       public static native boolean ClosingSignedFeeRange_eq(long a, long b);
        // void ClosingSigned_free(struct LDKClosingSigned this_obj);
        public static native void ClosingSigned_free(long this_obj);
        // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
@@ -5737,6 +5905,8 @@ public class bindings {
        public static native long ClosingSigned_clone_ptr(long arg);
        // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
        public static native long ClosingSigned_clone(long orig);
+       // bool ClosingSigned_eq(const struct LDKClosingSigned *NONNULL_PTR a, const struct LDKClosingSigned *NONNULL_PTR b);
+       public static native boolean ClosingSigned_eq(long a, long b);
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
        public static native void UpdateAddHTLC_free(long this_obj);
        // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
@@ -5763,6 +5933,8 @@ public class bindings {
        public static native long UpdateAddHTLC_clone_ptr(long arg);
        // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
        public static native long UpdateAddHTLC_clone(long orig);
+       // bool UpdateAddHTLC_eq(const struct LDKUpdateAddHTLC *NONNULL_PTR a, const struct LDKUpdateAddHTLC *NONNULL_PTR b);
+       public static native boolean UpdateAddHTLC_eq(long a, long b);
        // void OnionMessage_free(struct LDKOnionMessage this_obj);
        public static native void OnionMessage_free(long this_obj);
        // struct LDKPublicKey OnionMessage_get_blinding_point(const struct LDKOnionMessage *NONNULL_PTR this_ptr);
@@ -5773,6 +5945,8 @@ public class bindings {
        public static native long OnionMessage_clone_ptr(long arg);
        // struct LDKOnionMessage OnionMessage_clone(const struct LDKOnionMessage *NONNULL_PTR orig);
        public static native long OnionMessage_clone(long orig);
+       // bool OnionMessage_eq(const struct LDKOnionMessage *NONNULL_PTR a, const struct LDKOnionMessage *NONNULL_PTR b);
+       public static native boolean OnionMessage_eq(long a, long b);
        // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
        public static native void UpdateFulfillHTLC_free(long this_obj);
        // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
@@ -5793,6 +5967,8 @@ public class bindings {
        public static native long UpdateFulfillHTLC_clone_ptr(long arg);
        // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
        public static native long UpdateFulfillHTLC_clone(long orig);
+       // bool UpdateFulfillHTLC_eq(const struct LDKUpdateFulfillHTLC *NONNULL_PTR a, const struct LDKUpdateFulfillHTLC *NONNULL_PTR b);
+       public static native boolean UpdateFulfillHTLC_eq(long a, long b);
        // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
        public static native void UpdateFailHTLC_free(long this_obj);
        // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
@@ -5807,6 +5983,8 @@ public class bindings {
        public static native long UpdateFailHTLC_clone_ptr(long arg);
        // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
        public static native long UpdateFailHTLC_clone(long orig);
+       // bool UpdateFailHTLC_eq(const struct LDKUpdateFailHTLC *NONNULL_PTR a, const struct LDKUpdateFailHTLC *NONNULL_PTR b);
+       public static native boolean UpdateFailHTLC_eq(long a, long b);
        // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
        public static native void UpdateFailMalformedHTLC_free(long this_obj);
        // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
@@ -5825,6 +6003,8 @@ public class bindings {
        public static native long UpdateFailMalformedHTLC_clone_ptr(long arg);
        // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
        public static native long UpdateFailMalformedHTLC_clone(long orig);
+       // bool UpdateFailMalformedHTLC_eq(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR a, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR b);
+       public static native boolean UpdateFailMalformedHTLC_eq(long a, long b);
        // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
        public static native void CommitmentSigned_free(long this_obj);
        // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
@@ -5845,6 +6025,8 @@ public class bindings {
        public static native long CommitmentSigned_clone_ptr(long arg);
        // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
        public static native long CommitmentSigned_clone(long orig);
+       // bool CommitmentSigned_eq(const struct LDKCommitmentSigned *NONNULL_PTR a, const struct LDKCommitmentSigned *NONNULL_PTR b);
+       public static native boolean CommitmentSigned_eq(long a, long b);
        // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
        public static native void RevokeAndACK_free(long this_obj);
        // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
@@ -5865,6 +6047,8 @@ public class bindings {
        public static native long RevokeAndACK_clone_ptr(long arg);
        // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
        public static native long RevokeAndACK_clone(long orig);
+       // bool RevokeAndACK_eq(const struct LDKRevokeAndACK *NONNULL_PTR a, const struct LDKRevokeAndACK *NONNULL_PTR b);
+       public static native boolean RevokeAndACK_eq(long a, long b);
        // void UpdateFee_free(struct LDKUpdateFee this_obj);
        public static native void UpdateFee_free(long this_obj);
        // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
@@ -5881,6 +6065,8 @@ public class bindings {
        public static native long UpdateFee_clone_ptr(long arg);
        // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
        public static native long UpdateFee_clone(long orig);
+       // bool UpdateFee_eq(const struct LDKUpdateFee *NONNULL_PTR a, const struct LDKUpdateFee *NONNULL_PTR b);
+       public static native boolean UpdateFee_eq(long a, long b);
        // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
        public static native void DataLossProtect_free(long this_obj);
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
@@ -5897,6 +6083,8 @@ public class bindings {
        public static native long DataLossProtect_clone_ptr(long arg);
        // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
        public static native long DataLossProtect_clone(long orig);
+       // bool DataLossProtect_eq(const struct LDKDataLossProtect *NONNULL_PTR a, const struct LDKDataLossProtect *NONNULL_PTR b);
+       public static native boolean DataLossProtect_eq(long a, long b);
        // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
        public static native void ChannelReestablish_free(long this_obj);
        // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
@@ -5915,6 +6103,8 @@ public class bindings {
        public static native long ChannelReestablish_clone_ptr(long arg);
        // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
        public static native long ChannelReestablish_clone(long orig);
+       // bool ChannelReestablish_eq(const struct LDKChannelReestablish *NONNULL_PTR a, const struct LDKChannelReestablish *NONNULL_PTR b);
+       public static native boolean ChannelReestablish_eq(long a, long b);
        // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
        public static native void AnnouncementSignatures_free(long this_obj);
        // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
@@ -5939,6 +6129,8 @@ public class bindings {
        public static native long AnnouncementSignatures_clone_ptr(long arg);
        // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
        public static native long AnnouncementSignatures_clone(long orig);
+       // bool AnnouncementSignatures_eq(const struct LDKAnnouncementSignatures *NONNULL_PTR a, const struct LDKAnnouncementSignatures *NONNULL_PTR b);
+       public static native boolean AnnouncementSignatures_eq(long a, long b);
        // void NetAddress_free(struct LDKNetAddress this_ptr);
        public static native void NetAddress_free(long this_ptr);
        // uint64_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
@@ -5955,6 +6147,8 @@ public class bindings {
        public static native long NetAddress_onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port);
        // struct LDKNetAddress NetAddress_hostname(struct LDKHostname hostname, uint16_t port);
        public static native long NetAddress_hostname(long hostname, short port);
+       // bool NetAddress_eq(const struct LDKNetAddress *NONNULL_PTR a, const struct LDKNetAddress *NONNULL_PTR b);
+       public static native boolean NetAddress_eq(long a, long b);
        // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
        public static native byte[] NetAddress_write(long obj);
        // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
@@ -5989,6 +6183,8 @@ public class bindings {
        public static native long UnsignedNodeAnnouncement_clone_ptr(long arg);
        // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
        public static native long UnsignedNodeAnnouncement_clone(long orig);
+       // bool UnsignedNodeAnnouncement_eq(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR a, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR b);
+       public static native boolean UnsignedNodeAnnouncement_eq(long a, long b);
        // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
        public static native void NodeAnnouncement_free(long this_obj);
        // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
@@ -6005,6 +6201,8 @@ public class bindings {
        public static native long NodeAnnouncement_clone_ptr(long arg);
        // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
        public static native long NodeAnnouncement_clone(long orig);
+       // bool NodeAnnouncement_eq(const struct LDKNodeAnnouncement *NONNULL_PTR a, const struct LDKNodeAnnouncement *NONNULL_PTR b);
+       public static native boolean NodeAnnouncement_eq(long a, long b);
        // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
        public static native void UnsignedChannelAnnouncement_free(long this_obj);
        // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
@@ -6039,6 +6237,8 @@ public class bindings {
        public static native long UnsignedChannelAnnouncement_clone_ptr(long arg);
        // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
        public static native long UnsignedChannelAnnouncement_clone(long orig);
+       // bool UnsignedChannelAnnouncement_eq(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR a, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR b);
+       public static native boolean UnsignedChannelAnnouncement_eq(long a, long b);
        // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
        public static native void ChannelAnnouncement_free(long this_obj);
        // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
@@ -6067,6 +6267,8 @@ public class bindings {
        public static native long ChannelAnnouncement_clone_ptr(long arg);
        // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
        public static native long ChannelAnnouncement_clone(long orig);
+       // bool ChannelAnnouncement_eq(const struct LDKChannelAnnouncement *NONNULL_PTR a, const struct LDKChannelAnnouncement *NONNULL_PTR b);
+       public static native boolean ChannelAnnouncement_eq(long a, long b);
        // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
        public static native void UnsignedChannelUpdate_free(long this_obj);
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
@@ -6115,6 +6317,8 @@ public class bindings {
        public static native long UnsignedChannelUpdate_clone_ptr(long arg);
        // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
        public static native long UnsignedChannelUpdate_clone(long orig);
+       // bool UnsignedChannelUpdate_eq(const struct LDKUnsignedChannelUpdate *NONNULL_PTR a, const struct LDKUnsignedChannelUpdate *NONNULL_PTR b);
+       public static native boolean UnsignedChannelUpdate_eq(long a, long b);
        // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
        public static native void ChannelUpdate_free(long this_obj);
        // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
@@ -6131,6 +6335,8 @@ public class bindings {
        public static native long ChannelUpdate_clone_ptr(long arg);
        // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
        public static native long ChannelUpdate_clone(long orig);
+       // bool ChannelUpdate_eq(const struct LDKChannelUpdate *NONNULL_PTR a, const struct LDKChannelUpdate *NONNULL_PTR b);
+       public static native boolean ChannelUpdate_eq(long a, long b);
        // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
        public static native void QueryChannelRange_free(long this_obj);
        // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
@@ -6151,6 +6357,8 @@ public class bindings {
        public static native long QueryChannelRange_clone_ptr(long arg);
        // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
        public static native long QueryChannelRange_clone(long orig);
+       // bool QueryChannelRange_eq(const struct LDKQueryChannelRange *NONNULL_PTR a, const struct LDKQueryChannelRange *NONNULL_PTR b);
+       public static native boolean QueryChannelRange_eq(long a, long b);
        // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
        public static native void ReplyChannelRange_free(long this_obj);
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
@@ -6179,6 +6387,8 @@ public class bindings {
        public static native long ReplyChannelRange_clone_ptr(long arg);
        // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
        public static native long ReplyChannelRange_clone(long orig);
+       // bool ReplyChannelRange_eq(const struct LDKReplyChannelRange *NONNULL_PTR a, const struct LDKReplyChannelRange *NONNULL_PTR b);
+       public static native boolean ReplyChannelRange_eq(long a, long b);
        // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
        public static native void QueryShortChannelIds_free(long this_obj);
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
@@ -6195,6 +6405,8 @@ public class bindings {
        public static native long QueryShortChannelIds_clone_ptr(long arg);
        // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
        public static native long QueryShortChannelIds_clone(long orig);
+       // bool QueryShortChannelIds_eq(const struct LDKQueryShortChannelIds *NONNULL_PTR a, const struct LDKQueryShortChannelIds *NONNULL_PTR b);
+       public static native boolean QueryShortChannelIds_eq(long a, long b);
        // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
        public static native void ReplyShortChannelIdsEnd_free(long this_obj);
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
@@ -6211,6 +6423,8 @@ public class bindings {
        public static native long ReplyShortChannelIdsEnd_clone_ptr(long arg);
        // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
        public static native long ReplyShortChannelIdsEnd_clone(long orig);
+       // bool ReplyShortChannelIdsEnd_eq(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR a, const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR b);
+       public static native boolean ReplyShortChannelIdsEnd_eq(long a, long b);
        // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
        public static native void GossipTimestampFilter_free(long this_obj);
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
@@ -6231,6 +6445,8 @@ public class bindings {
        public static native long GossipTimestampFilter_clone_ptr(long arg);
        // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
        public static native long GossipTimestampFilter_clone(long orig);
+       // bool GossipTimestampFilter_eq(const struct LDKGossipTimestampFilter *NONNULL_PTR a, const struct LDKGossipTimestampFilter *NONNULL_PTR b);
+       public static native boolean GossipTimestampFilter_eq(long a, long b);
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
        public static native void ErrorAction_free(long this_ptr);
        // uint64_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
@@ -6297,6 +6513,8 @@ public class bindings {
        public static native long CommitmentUpdate_clone_ptr(long arg);
        // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
        public static native long CommitmentUpdate_clone(long orig);
+       // bool CommitmentUpdate_eq(const struct LDKCommitmentUpdate *NONNULL_PTR a, const struct LDKCommitmentUpdate *NONNULL_PTR b);
+       public static native boolean CommitmentUpdate_eq(long a, long b);
        // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
        public static native void ChannelMessageHandler_free(long this_ptr);
        // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
@@ -6455,6 +6673,8 @@ public class bindings {
        public static native long IgnoringMessageHandler_as_OnionMessageProvider(long this_arg);
        // struct LDKOnionMessageHandler IgnoringMessageHandler_as_OnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
        public static native long IgnoringMessageHandler_as_OnionMessageHandler(long this_arg);
+       // struct LDKCustomOnionMessageHandler IgnoringMessageHandler_as_CustomOnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       public static native long IgnoringMessageHandler_as_CustomOnionMessageHandler(long this_arg);
        // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
        public static native long IgnoringMessageHandler_as_CustomMessageReader(long this_arg);
        // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
@@ -6503,8 +6723,8 @@ public class bindings {
        public static native long PeerHandleError_clone(long orig);
        // void PeerManager_free(struct LDKPeerManager this_obj);
        public static native void PeerManager_free(long this_obj);
-       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint64_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
-       public static native long PeerManager_new(long message_handler, byte[] our_node_secret, long current_time, byte[] ephemeral_random_data, long logger, long custom_message_handler);
+       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
+       public static native long PeerManager_new(long message_handler, byte[] our_node_secret, int current_time, byte[] ephemeral_random_data, long logger, long custom_message_handler);
        // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
        public static native byte[][] PeerManager_get_peer_node_ids(long this_arg);
        // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_NetAddressZ remote_network_address);
@@ -6585,6 +6805,8 @@ 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);
+       // bool TxCreationKeys_eq(const struct LDKTxCreationKeys *NONNULL_PTR a, const struct LDKTxCreationKeys *NONNULL_PTR b);
+       public static native boolean TxCreationKeys_eq(long a, long b);
        // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
        public static native long TxCreationKeys_clone_ptr(long arg);
        // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
@@ -6621,6 +6843,8 @@ public class bindings {
        public static native long ChannelPublicKeys_clone_ptr(long arg);
        // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
        public static native long ChannelPublicKeys_clone(long orig);
+       // bool ChannelPublicKeys_eq(const struct LDKChannelPublicKeys *NONNULL_PTR a, const struct LDKChannelPublicKeys *NONNULL_PTR b);
+       public static native boolean ChannelPublicKeys_eq(long a, long b);
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
        public static native byte[] ChannelPublicKeys_write(long obj);
        // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
@@ -6659,6 +6883,8 @@ public class bindings {
        public static native long HTLCOutputInCommitment_clone_ptr(long arg);
        // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
        public static native long HTLCOutputInCommitment_clone(long orig);
+       // bool HTLCOutputInCommitment_eq(const struct LDKHTLCOutputInCommitment *NONNULL_PTR a, const struct LDKHTLCOutputInCommitment *NONNULL_PTR b);
+       public static native boolean HTLCOutputInCommitment_eq(long a, long b);
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
        public static native byte[] HTLCOutputInCommitment_write(long obj);
        // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
@@ -6799,6 +7025,8 @@ public class bindings {
        public static native long ClosingTransaction_clone(long orig);
        // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
        public static native long ClosingTransaction_hash(long o);
+       // bool ClosingTransaction_eq(const struct LDKClosingTransaction *NONNULL_PTR a, const struct LDKClosingTransaction *NONNULL_PTR b);
+       public static native boolean ClosingTransaction_eq(long a, long b);
        // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
        public static native long ClosingTransaction_new(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, long funding_outpoint);
        // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
@@ -6897,38 +7125,24 @@ public class bindings {
        public static native void InvoiceFeatures_free(long this_obj);
        // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
        public static native void ChannelTypeFeatures_free(long this_obj);
-       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known_channel_features(void);
-       public static native long InitFeatures_known_channel_features();
-       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known_channel_features(void);
-       public static native long NodeFeatures_known_channel_features();
        // 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 bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
        public static native boolean InitFeatures_requires_unknown_bits(long this_arg);
        // 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 bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
        public static native boolean NodeFeatures_requires_unknown_bits(long this_arg);
        // 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();
        // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
        public static native boolean ChannelFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
        public static native long InvoiceFeatures_empty();
-       // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
-       public static native long InvoiceFeatures_known();
        // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
        public static native boolean InvoiceFeatures_requires_unknown_bits(long this_arg);
        // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
        public static native long ChannelTypeFeatures_empty();
-       // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
-       public static native long ChannelTypeFeatures_known();
        // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
        public static native boolean ChannelTypeFeatures_requires_unknown_bits(long this_arg);
        // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
@@ -7227,6 +7441,8 @@ public class bindings {
        public static native long ShutdownScript_clone_ptr(long arg);
        // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
        public static native long ShutdownScript_clone(long orig);
+       // bool ShutdownScript_eq(const struct LDKShutdownScript *NONNULL_PTR a, const struct LDKShutdownScript *NONNULL_PTR b);
+       public static native boolean ShutdownScript_eq(long a, long b);
        // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
        public static native void InvalidShutdownScript_free(long this_obj);
        // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
@@ -7295,6 +7511,8 @@ public class bindings {
        public static native long NetworkUpdate_channel_failure(long short_channel_id, boolean is_permanent);
        // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
        public static native long NetworkUpdate_node_failure(byte[] node_id, boolean is_permanent);
+       // bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+       public static native boolean NetworkUpdate_eq(long a, long b);
        // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
        public static native byte[] NetworkUpdate_write(long obj);
        // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
@@ -7347,6 +7565,8 @@ public class bindings {
        public static native long ChannelUpdateInfo_clone_ptr(long arg);
        // struct LDKChannelUpdateInfo ChannelUpdateInfo_clone(const struct LDKChannelUpdateInfo *NONNULL_PTR orig);
        public static native long ChannelUpdateInfo_clone(long orig);
+       // bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+       public static native boolean ChannelUpdateInfo_eq(long a, long b);
        // struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
        public static native byte[] ChannelUpdateInfo_write(long obj);
        // struct LDKCResult_ChannelUpdateInfoDecodeErrorZ ChannelUpdateInfo_read(struct LDKu8slice ser);
@@ -7385,6 +7605,8 @@ public class bindings {
        public static native long ChannelInfo_clone_ptr(long arg);
        // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
        public static native long ChannelInfo_clone(long orig);
+       // bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+       public static native boolean ChannelInfo_eq(long a, long b);
        // MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
        public static native long ChannelInfo_get_directional_info(long this_arg, byte channel_flags);
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
@@ -7479,6 +7701,8 @@ public class bindings {
        public static native long NodeAnnouncementInfo_clone_ptr(long arg);
        // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
        public static native long NodeAnnouncementInfo_clone(long orig);
+       // bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+       public static native boolean NodeAnnouncementInfo_eq(long a, long b);
        // 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);
@@ -7495,6 +7719,8 @@ public class bindings {
        public static native long NodeAlias_clone_ptr(long arg);
        // struct LDKNodeAlias NodeAlias_clone(const struct LDKNodeAlias *NONNULL_PTR orig);
        public static native long NodeAlias_clone(long orig);
+       // bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+       public static native boolean NodeAlias_eq(long a, long b);
        // struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
        public static native byte[] NodeAlias_write(long obj);
        // struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
@@ -7519,6 +7745,8 @@ public class bindings {
        public static native long NodeInfo_clone_ptr(long arg);
        // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
        public static native long NodeInfo_clone(long orig);
+       // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+       public static native boolean NodeInfo_eq(long a, long b);
        // 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);
@@ -7547,12 +7775,12 @@ public class bindings {
        public static native long NetworkGraph_add_channel_from_partial_announcement(long this_arg, long short_channel_id, long timestamp, long features, byte[] node_id_1, byte[] node_id_2);
        // void NetworkGraph_channel_failed(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
        public static native void NetworkGraph_channel_failed(long this_arg, long short_channel_id, boolean is_permanent);
-       // void NetworkGraph_node_failed(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
-       public static native void NetworkGraph_node_failed(long this_arg, byte[] _node_id, boolean is_permanent);
-       // void NetworkGraph_remove_stale_channels(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
-       public static native void NetworkGraph_remove_stale_channels(long this_arg);
-       // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
-       public static native void NetworkGraph_remove_stale_channels_with_time(long this_arg, long current_time_unix);
+       // void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
+       public static native void NetworkGraph_node_failed_permanent(long this_arg, byte[] node_id);
+       // void NetworkGraph_remove_stale_channels_and_tracking(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+       public static native void NetworkGraph_remove_stale_channels_and_tracking(long this_arg);
+       // void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+       public static native void NetworkGraph_remove_stale_channels_and_tracking_with_time(long this_arg, long current_time_unix);
        // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
        public static native long NetworkGraph_update_channel(long this_arg, long msg);
        // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
@@ -7855,6 +8083,18 @@ public class bindings {
        public static native long ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(long this_ptr);
        // void ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(long this_ptr, long val);
+       // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(long this_ptr);
+       // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(long this_ptr, long val);
+       // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(long this_ptr);
+       // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(long this_ptr, long val);
+       // uint64_t ProbabilisticScoringParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+       public static native long ProbabilisticScoringParameters_get_historical_no_updates_half_life(long this_ptr);
+       // void ProbabilisticScoringParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void ProbabilisticScoringParameters_set_historical_no_updates_half_life(long this_ptr, long val);
        // uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
        public static native long ProbabilisticScoringParameters_get_anti_probing_penalty_msat(long this_ptr);
        // void ProbabilisticScoringParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
@@ -7929,16 +8169,28 @@ public class bindings {
        public static native long SendError_too_few_blinded_hops();
        // struct LDKSendError SendError_invalid_first_hop(void);
        public static native long SendError_invalid_first_hop();
+       // struct LDKSendError SendError_invalid_message(void);
+       public static native long SendError_invalid_message();
        // struct LDKSendError SendError_buffer_full(void);
        public static native long SendError_buffer_full();
-       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger);
-       public static native long OnionMessenger_new(long keys_manager, long logger);
-       // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKBlindedRoute reply_path);
-       public static native long OnionMessenger_send_onion_message(long this_arg, byte[][] intermediate_nodes, long destination, long reply_path);
+       // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
+       public static native boolean SendError_eq(long a, long b);
+       // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
+       public static native void CustomOnionMessageHandler_free(long this_ptr);
+       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
+       public static native long OnionMessenger_new(long keys_manager, long logger, long custom_handler);
+       // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_custom_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKCustomOnionMessageContents msg, struct LDKBlindedRoute reply_path);
+       public static native long OnionMessenger_send_custom_onion_message(long this_arg, byte[][] intermediate_nodes, long destination, long msg, long reply_path);
        // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
        public static native long OnionMessenger_as_OnionMessageHandler(long this_arg);
        // struct LDKOnionMessageProvider OnionMessenger_as_OnionMessageProvider(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
        public static native long OnionMessenger_as_OnionMessageProvider(long this_arg);
+       // uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg);
+       public static native long CustomOnionMessageContents_clone_ptr(long arg);
+       // struct LDKCustomOnionMessageContents CustomOnionMessageContents_clone(const struct LDKCustomOnionMessageContents *NONNULL_PTR orig);
+       public static native long CustomOnionMessageContents_clone(long orig);
+       // void CustomOnionMessageContents_free(struct LDKCustomOnionMessageContents this_ptr);
+       public static native void CustomOnionMessageContents_free(long this_ptr);
        // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
        public static native void FilesystemPersister_free(long this_obj);
        // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
@@ -8005,6 +8257,8 @@ public class bindings {
        public static native long ParseError_invalid_slice_length(String a);
        // struct LDKParseError ParseError_skip(void);
        public static native long ParseError_skip();
+       // bool ParseError_eq(const struct LDKParseError *NONNULL_PTR a, const struct LDKParseError *NONNULL_PTR b);
+       public static native boolean ParseError_eq(long a, long b);
        // void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
        public static native void ParseOrSemanticError_free(long this_ptr);
        // uint64_t ParseOrSemanticError_clone_ptr(LDKParseOrSemanticError *NONNULL_PTR arg);
@@ -8015,6 +8269,8 @@ public class bindings {
        public static native long ParseOrSemanticError_parse_error(long a);
        // struct LDKParseOrSemanticError ParseOrSemanticError_semantic_error(enum LDKSemanticError a);
        public static native long ParseOrSemanticError_semantic_error(SemanticError a);
+       // bool ParseOrSemanticError_eq(const struct LDKParseOrSemanticError *NONNULL_PTR a, const struct LDKParseOrSemanticError *NONNULL_PTR b);
+       public static native boolean ParseOrSemanticError_eq(long a, long b);
        // void Invoice_free(struct LDKInvoice this_obj);
        public static native void Invoice_free(long this_obj);
        // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
@@ -8411,18 +8667,18 @@ public class bindings {
        public static native byte[] InFlightHtlcs_write(long obj);
        // struct LDKCResult_InFlightHtlcsDecodeErrorZ InFlightHtlcs_read(struct LDKu8slice ser);
        public static native long InFlightHtlcs_read(byte[] ser);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKKeysInterface keys_manager, enum LDKCurrency network);
-       public static native long create_phantom_invoice(long amt_msat, byte[] payment_hash, String description, int invoice_expiry_delta_secs, long[] phantom_route_hints, long keys_manager, Currency network);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKKeysInterface keys_manager, enum LDKCurrency network);
-       public static native long create_phantom_invoice_with_description_hash(long amt_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long description_hash, long[] phantom_route_hints, long keys_manager, Currency network);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint32_t invoice_expiry_delta_secs);
-       public static native long create_invoice_from_channelmanager(long channelmanager, long keys_manager, Currency network, long amt_msat, String description, int invoice_expiry_delta_secs);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint32_t invoice_expiry_delta_secs);
-       public static native long create_invoice_from_channelmanager_with_description_hash(long channelmanager, long keys_manager, Currency network, long amt_msat, long description_hash, int invoice_expiry_delta_secs);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
-       public static native long create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(long channelmanager, long keys_manager, Currency network, long amt_msat, long description_hash, long duration_since_epoch, int invoice_expiry_delta_secs);
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
-       public static native long create_invoice_from_channelmanager_and_duration_since_epoch(long channelmanager, long keys_manager, Currency network, long amt_msat, String description, long duration_since_epoch, int invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network);
+       public static native long create_phantom_invoice(long amt_msat, byte[] payment_hash, String description, int invoice_expiry_delta_secs, long[] phantom_route_hints, long keys_manager, long logger, Currency network);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network);
+       public static native long create_phantom_invoice_with_description_hash(long amt_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long description_hash, long[] phantom_route_hints, long keys_manager, long logger, Currency network);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint32_t invoice_expiry_delta_secs);
+       public static native long create_invoice_from_channelmanager(long channelmanager, long keys_manager, long logger, Currency network, long amt_msat, String description, int invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint32_t invoice_expiry_delta_secs);
+       public static native long create_invoice_from_channelmanager_with_description_hash(long channelmanager, long keys_manager, long logger, Currency network, long amt_msat, long description_hash, int invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+       public static native long create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(long channelmanager, long keys_manager, long logger, Currency network, long amt_msat, long description_hash, long duration_since_epoch, int invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+       public static native long create_invoice_from_channelmanager_and_duration_since_epoch(long channelmanager, long keys_manager, long logger, Currency network, long amt_msat, String description, long duration_since_epoch, int invoice_expiry_delta_secs);
        // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
        public static native void DefaultRouter_free(long this_obj);
        // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKThirtyTwoBytes random_seed_bytes, struct LDKLockableScore scorer);
@@ -8453,8 +8709,8 @@ public class bindings {
        public static native void RapidGossipSync_free(long this_obj);
        // MUST_USE_RES struct LDKRapidGossipSync RapidGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph);
        public static native long RapidGossipSync_new(long network_graph);
-       // MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_sync_network_graph_with_file_path(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKStr sync_path);
-       public static native long RapidGossipSync_sync_network_graph_with_file_path(long this_arg, String sync_path);
+       // MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_update_network_graph(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKu8slice update_data);
+       public static native long RapidGossipSync_update_network_graph(long this_arg, byte[] update_data);
        // MUST_USE_RES bool RapidGossipSync_is_initial_sync_complete(const struct LDKRapidGossipSync *NONNULL_PTR this_arg);
        public static native boolean RapidGossipSync_is_initial_sync_complete(long this_arg);
        // void GraphSyncError_free(struct LDKGraphSyncError this_ptr);
@@ -8467,6 +8723,4 @@ public class bindings {
        public static native long GraphSyncError_decode_error(long a);
        // struct LDKGraphSyncError GraphSyncError_lightning_error(struct LDKLightningError a);
        public static native long GraphSyncError_lightning_error(long a);
-       // MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_update_network_graph(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKu8slice update_data);
-       public static native long RapidGossipSync_update_network_graph(long this_arg, byte[] update_data);
 }
index ac94c9ce3ee5d9607ce9543fad480498ff38d8fd..1d0e8e18d5b044b15db4a76a46c99e2943532077 100644 (file)
@@ -34,8 +34,8 @@ public class APIError extends CommonBase {
                if (raw_val.getClass() == bindings.LDKAPIError.ChannelUnavailable.class) {
                        return new ChannelUnavailable(ptr, (bindings.LDKAPIError.ChannelUnavailable)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKAPIError.MonitorUpdateFailed.class) {
-                       return new MonitorUpdateFailed(ptr, (bindings.LDKAPIError.MonitorUpdateFailed)raw_val);
+               if (raw_val.getClass() == bindings.LDKAPIError.MonitorUpdateInProgress.class) {
+                       return new MonitorUpdateInProgress(ptr, (bindings.LDKAPIError.MonitorUpdateInProgress)raw_val);
                }
                if (raw_val.getClass() == bindings.LDKAPIError.IncompatibleShutdownScript.class) {
                        return new IncompatibleShutdownScript(ptr, (bindings.LDKAPIError.IncompatibleShutdownScript)raw_val);
@@ -107,11 +107,17 @@ public class APIError extends CommonBase {
                }
        }
        /**
-        * An attempt to call watch/update_channel returned an Err (ie you did this!), causing the
-        * attempted action to fail.
+        * An attempt to call [`chain::Watch::watch_channel`]/[`chain::Watch::update_channel`]
+        * returned a [`ChannelMonitorUpdateStatus::InProgress`] indicating the persistence of a
+        * monitor update is awaiting async resolution. Once it resolves the attempted action should
+        * complete automatically.
+        * 
+        * [`chain::Watch::watch_channel`]: crate::chain::Watch::watch_channel
+        * [`chain::Watch::update_channel`]: crate::chain::Watch::update_channel
+        * [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress
         */
-       public final static class MonitorUpdateFailed extends APIError {
-               private MonitorUpdateFailed(long ptr, bindings.LDKAPIError.MonitorUpdateFailed obj) {
+       public final static class MonitorUpdateInProgress extends APIError {
+               private MonitorUpdateInProgress(long ptr, bindings.LDKAPIError.MonitorUpdateInProgress obj) {
                        super(null, ptr);
                }
        }
@@ -206,10 +212,10 @@ public class APIError extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new MonitorUpdateFailed-variant APIError
+        * Utility method to constructs a new MonitorUpdateInProgress-variant APIError
         */
-       public static APIError monitor_update_failed() {
-               long ret = bindings.APIError_monitor_update_failed();
+       public static APIError monitor_update_in_progress() {
+               long ret = bindings.APIError_monitor_update_in_progress();
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
@@ -229,4 +235,19 @@ public class APIError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two APIErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(APIError b) {
+               boolean ret = bindings.APIError_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof APIError)) return false;
+               return this.eq((APIError)o);
+       }
 }
index fc0b4a5c1bd0ae0efadd58eaf701b77f5f2be7ac..363d4dd8bec62771cdda76b3bff14f66be27f6eb 100644 (file)
@@ -325,6 +325,23 @@ public class AcceptChannel extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two AcceptChannels contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(AcceptChannel b) {
+               boolean ret = bindings.AcceptChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof AcceptChannel)) return false;
+               return this.eq((AcceptChannel)o);
+       }
        /**
         * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
         */
index c71218f5b777b973564b44f37015ef3662d632a3..dc87d6afe5e9fabd0442b6711b9f73491c9be6c5 100644 (file)
@@ -125,6 +125,23 @@ public class AnnouncementSignatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two AnnouncementSignaturess contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(AnnouncementSignatures b) {
+               boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof AnnouncementSignatures)) return false;
+               return this.eq((AnnouncementSignatures)o);
+       }
        /**
         * Serialize the AnnouncementSignatures object into a byte array which can be read by AnnouncementSignatures_read
         */
index fbb0a917919fe07dd2955a3e3c92cdf63ed746ec..d8f30b2a3495cd1faa060987ac300ba036574add 100644 (file)
@@ -18,8 +18,8 @@ import javax.annotation.Nullable;
  * [`ChannelManager`] persistence should be done in the background.
  * Calling [`ChannelManager::timer_tick_occurred`] and [`PeerManager::timer_tick_occurred`]
  * at the appropriate intervals.
- * Calling [`NetworkGraph::remove_stale_channels`] (if a [`GossipSync`] with a [`NetworkGraph`]
- * is provided to [`BackgroundProcessor::start`]).
+ * Calling [`NetworkGraph::remove_stale_channels_and_tracking`] (if a [`GossipSync`] with a
+ * [`NetworkGraph`] is provided to [`BackgroundProcessor::start`]).
  * 
  * It will also call [`PeerManager::process_events`] periodically though this shouldn't be relied
  * upon as doing so may result in high latency.
index c96c87630ccf7b6c07a89b5829042d2ba9e89dcd..9deff4d35421a78c5e929dbae26e0837370dfa6b 100644 (file)
@@ -181,6 +181,11 @@ public class BaseSign extends CommonBase {
                 * chosen to forgo their output as dust.
                 */
                Result_SignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx);
+               /**
+                * Computes the signature for a commitment transaction's anchor output used as an
+                * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+                */
+               Result_SignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input);
                /**
                 * Signs a channel announcement message with our funding key and our node secret key (aka
                 * node_id or network_key), proving it comes from one of the channel participants.
@@ -283,6 +288,12 @@ public class BaseSign extends CommonBase {
                                long result = ret == null ? 0 : ret.clone_ptr();
                                return result;
                        }
+                       @Override public long sign_holder_anchor_input(byte[] anchor_tx, long input) {
+                               Result_SignatureNoneZ ret = arg.sign_holder_anchor_input(anchor_tx, input);
+                               Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
+                       }
                        @Override public long sign_channel_announcement(long msg) {
                                org.ldk.structs.UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, msg); }
                                Result_C2Tuple_SignatureSignatureZNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
@@ -539,6 +550,20 @@ public class BaseSign extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Computes the signature for a commitment transaction's anchor output used as an
+        * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+        */
+       public Result_SignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
+               long ret = bindings.BaseSign_sign_holder_anchor_input(this.ptr, anchor_tx, input);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(anchor_tx);
+               Reference.reachabilityFence(input);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Signs a channel announcement message with our funding key and our node secret key (aka
         * node_id or network_key), proving it comes from one of the channel participants.
index fd0e09c11c943c8c68a8ebc2b6bd4b418cf44397..325b80690e4a2b25056f3d841a1c3d605d1710ca 100644 (file)
@@ -38,6 +38,23 @@ public class BestBlock extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two BestBlocks contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(BestBlock b) {
+               boolean ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof BestBlock)) return false;
+               return this.eq((BestBlock)o);
+       }
        /**
         * Constructs a `BestBlock` that represents the genesis block at height 0 of the given
         * network.
index 8efa473894a40dc86f999540386e3b8f3a1702f6..0a3d9fe8047643dea60d32e481961226c480f8e7 100644 (file)
@@ -121,12 +121,12 @@ public class ChainMonitor extends CommonBase {
 
        /**
         * Indicates the persistence of a [`ChannelMonitor`] has completed after
-        * [`ChannelMonitorUpdateErr::TemporaryFailure`] was returned from an update operation.
+        * [`ChannelMonitorUpdateStatus::InProgress`] was returned from an update operation.
         * 
         * Thus, the anticipated use is, at a high level:
         * 1) This [`ChainMonitor`] calls [`Persist::update_persisted_channel`] which stores the
         * update to disk and begins updating any remote (e.g. watchtower/backup) copies,
-        * returning [`ChannelMonitorUpdateErr::TemporaryFailure`],
+        * returning [`ChannelMonitorUpdateStatus::InProgress`],
         * 2) once all remote copies are updated, you call this function with the
         * `completed_update_id` that completed, and once all pending updates have completed the
         * channel will be re-enabled.
index 9c06ce9ec19dcd11c0eb5eb509b1c3d06f0c2a25..443aeeb109c47a1c6489e2a7387d92810bffb17f 100644 (file)
@@ -149,6 +149,23 @@ public class ChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelAnnouncement b) {
+               boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelAnnouncement)) return false;
+               return this.eq((ChannelAnnouncement)o);
+       }
        /**
         * Serialize the ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read
         */
index 37f2bbde8c1ed96ee0528372114356014eef16e5..71e83fddd4a536c71bdb1a38b77aff1fa4749197 100644 (file)
@@ -153,6 +153,12 @@ public class ChannelConfig extends CommonBase {
         * to such payments may be sustantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
+        * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+        * channel negotiated throughout the channel open process, along with the fees required to have
+        * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+        * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+        * account the HTLC transaction fee as it is zero.
+        * 
         * This limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel. Setting this too low may prevent the
         * sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
@@ -176,6 +182,12 @@ public class ChannelConfig extends CommonBase {
         * to such payments may be sustantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
+        * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+        * channel negotiated throughout the channel open process, along with the fees required to have
+        * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+        * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+        * account the HTLC transaction fee as it is zero.
+        * 
         * This limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel. Setting this too low may prevent the
         * sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
@@ -283,6 +295,23 @@ public class ChannelConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelConfigs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelConfig b) {
+               boolean ret = bindings.ChannelConfig_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelConfig)) return false;
+               return this.eq((ChannelConfig)o);
+       }
        /**
         * Creates a "default" ChannelConfig. See struct and individual field documentaiton for details on which values are used.
         */
index 5ff5863870e55a0e97eb15521910a02593a41c16..1735e936cc8775e350bf3155bc9d6170e9563c76 100644 (file)
@@ -66,17 +66,6 @@ public class ChannelFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static ChannelFeatures known() {
-               long ret = bindings.ChannelFeatures_known();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index db9f3589bac668671062d87ce8f165f48b7d6f05..ea695c3d3938ffadb8619c7e070e61811acb5348 100644 (file)
@@ -213,6 +213,23 @@ public class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelInfo b) {
+               boolean ret = bindings.ChannelInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelInfo)) return false;
+               return this.eq((ChannelInfo)o);
+       }
        /**
         * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
         * 
index 883234c20afbe9ab91322b0ce1470af6a65e2da4..75a26751229229be7d9e47a91a9c70a8fa79755e 100644 (file)
@@ -320,12 +320,12 @@ public class ChannelManager extends CommonBase {
         * PaymentSendFailure for more info.
         * 
         * In general, a path may raise:
-        * APIError::RouteError when an invalid route or forwarding parameter (cltv_delta, fee,
+        * [`APIError::RouteError`] when an invalid route or forwarding parameter (cltv_delta, fee,
         * node public key) is specified.
-        * APIError::ChannelUnavailable if the next-hop channel is not available for updates
+        * [`APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
         * (including due to previous monitor update failure or new permanent monitor update
         * failure).
-        * APIError::MonitorUpdateFailed if a new monitor update failure prevented sending the
+        * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
         * relevant updates.
         * 
         * Note that depending on the type of the PaymentSendFailure the HTLC may have been
index 73d0ca172a3e26e54d33e93e15abdc2326dd33f1..b8367adc84aa20464577ae03a856b9cc124779e9 100644 (file)
@@ -94,12 +94,19 @@ public class ChannelMessageHandler extends CommonBase {
                 * is believed to be possible in the future (eg they're sending us messages we don't
                 * understand or indicate they require unknown feature bits), no_connection_possible is set
                 * and any outstanding channels should be failed.
+                * 
+                * Note that in some rare cases this may be called without a corresponding
+                * [`Self::peer_connected`].
                 */
                void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
                /**
                 * Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+                * 
+                * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+                * with us. Implementors should be somewhat conservative about doing so, however, as other
+                * message handlers may still wish to communicate with this peer.
                 */
-               void peer_connected(byte[] their_node_id, Init msg);
+               Result_NoneNoneZ peer_connected(byte[] their_node_id, Init msg);
                /**
                 * Handle an incoming channel_reestablish message from the given peer.
                 */
@@ -215,10 +222,12 @@ public class ChannelMessageHandler extends CommonBase {
                                arg.peer_disconnected(their_node_id, no_connection_possible);
                                Reference.reachabilityFence(arg);
                        }
-                       @Override public void peer_connected(byte[] their_node_id, long msg) {
+                       @Override public long peer_connected(byte[] their_node_id, long msg) {
                                org.ldk.structs.Init msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Init(null, msg); }
-                               arg.peer_connected(their_node_id, msg_hu_conv);
+                               Result_NoneNoneZ ret = arg.peer_connected(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
                        }
                        @Override public void handle_channel_reestablish(byte[] their_node_id, long msg) {
                                org.ldk.structs.ChannelReestablish msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelReestablish(null, msg); }
@@ -436,6 +445,9 @@ public class ChannelMessageHandler extends CommonBase {
         * is believed to be possible in the future (eg they're sending us messages we don't
         * understand or indicate they require unknown feature bits), no_connection_possible is set
         * and any outstanding channels should be failed.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        public void peer_disconnected(byte[] their_node_id, boolean no_connection_possible) {
                bindings.ChannelMessageHandler_peer_disconnected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), no_connection_possible);
@@ -446,13 +458,20 @@ public class ChannelMessageHandler extends CommonBase {
 
        /**
         * Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public void peer_connected(byte[] their_node_id, Init msg) {
-               bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+       public Result_NoneNoneZ peer_connected(byte[] their_node_id, Init msg) {
+               long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(msg); };
+               return ret_hu_conv;
        }
 
        /**
index 80a97f3491565b34d3f9c1bf662e27c9b81e2a55..1e4fa35b6621692281a50e9e2cd5ba4865175380 100644 (file)
@@ -193,14 +193,20 @@ public class ChannelMonitor extends CommonBase {
 
        /**
         * Used by ChannelManager deserialization to broadcast the latest holder state if its copy of
-        * the Channel was out-of-date. You may use it to get a broadcastable holder toxic tx in case of
-        * fallen-behind, i.e when receiving a channel_reestablish with a proof that our counterparty side knows
-        * a higher revocation secret than the holder commitment number we are aware of. Broadcasting these
-        * transactions are UNSAFE, as they allow counterparty side to punish you. Nevertheless you may want to
-        * broadcast them if counterparty don't close channel with his higher commitment transaction after a
-        * substantial amount of time (a month or even a year) to get back funds. Best may be to contact
-        * out-of-band the other node operator to coordinate with him if option is available to you.
-        * In any-case, choice is up to the user.
+        * the Channel was out-of-date.
+        * 
+        * You may also use this to broadcast the latest local commitment transaction, either because
+        * a monitor update failed with [`ChannelMonitorUpdateStatus::PermanentFailure`] or because we've
+        * fallen behind (i.e. we've received proof that our counterparty side knows a revocation
+        * secret we gave them that they shouldn't know).
+        * 
+        * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+        * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
+        * close channel with their commitment transaction after a substantial amount of time. Best
+        * may be to contact the other node operator out-of-band to coordinate other options available
+        * to you. In any-case, the choice is up to you.
+        * 
+        * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
         */
        public byte[][] get_latest_holder_commitment_txn(Logger logger) {
                byte[][] ret = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger == null ? 0 : logger.ptr);
index 876049c44a1d9f617b0408bc4317f641ba55da39..cbf5769feaf658677d3ea2d743f1a5701d94351f 100644 (file)
@@ -32,12 +32,14 @@ public class ChannelMonitorUpdate extends CommonBase {
         * increasing and increase by one for each new update, with one exception specified below.
         * 
         * This sequence number is also used to track up to which points updates which returned
-        * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+        * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
         * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
         * 
         * The only instance where update_id values are not strictly increasing is the case where we
         * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
         * its docs for more details.
+        * 
+        * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
         */
        public long get_update_id() {
                long ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
@@ -51,12 +53,14 @@ public class ChannelMonitorUpdate extends CommonBase {
         * increasing and increase by one for each new update, with one exception specified below.
         * 
         * This sequence number is also used to track up to which points updates which returned
-        * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+        * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
         * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
         * 
         * The only instance where update_id values are not strictly increasing is the case where we
         * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
         * its docs for more details.
+        * 
+        * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
         */
        public void set_update_id(long val) {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
index dbe5c3bbf33f9e596a94216240799cc98e6639ae..d122e0396e68cddf265caa6ec5e51380b9e0b98b 100644 (file)
@@ -162,6 +162,23 @@ public class ChannelPublicKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelPublicKeyss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelPublicKeys b) {
+               boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelPublicKeys)) return false;
+               return this.eq((ChannelPublicKeys)o);
+       }
        /**
         * Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read
         */
index 807609e04e0299c8dd06e51895c3ed5a57979b5a..f0fd3e8a30e79b15a96d9567e03265272efcaff4 100644 (file)
@@ -111,6 +111,23 @@ public class ChannelReady extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelReadys contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelReady b) {
+               boolean ret = bindings.ChannelReady_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelReady)) return false;
+               return this.eq((ChannelReady)o);
+       }
        /**
         * Serialize the ChannelReady object into a byte array which can be read by ChannelReady_read
         */
index 62203f1dacd9ff73abd5bf739d56e7cd8f205da4..ae89ef232ed0cbd78edeff47327a260246e9961b 100644 (file)
@@ -92,6 +92,23 @@ public class ChannelReestablish extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelReestablishs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelReestablish b) {
+               boolean ret = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelReestablish)) return false;
+               return this.eq((ChannelReestablish)o);
+       }
        /**
         * Serialize the ChannelReestablish object into a byte array which can be read by ChannelReestablish_read
         */
index 5c681f19dcc59dc151c8afeb51f62a3298ef539c..2a510c74eeadbbc05bbdebfb2723a9d4e662fcf1 100644 (file)
@@ -141,7 +141,8 @@ public class ChannelTransactionParameters extends CommonBase {
        }
 
        /**
-        * Are anchors used for this channel.  Boolean is serialization backwards-compatible
+        * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+        * serialization backwards-compatible.
         */
        public COption_NoneZ get_opt_anchors() {
                COption_NoneZ ret = bindings.ChannelTransactionParameters_get_opt_anchors(this.ptr);
@@ -150,7 +151,8 @@ public class ChannelTransactionParameters extends CommonBase {
        }
 
        /**
-        * Are anchors used for this channel.  Boolean is serialization backwards-compatible
+        * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+        * serialization backwards-compatible.
         */
        public void set_opt_anchors(org.ldk.enums.COption_NoneZ val) {
                bindings.ChannelTransactionParameters_set_opt_anchors(this.ptr, val);
index 0169bbc5c09337c9d3f39de830624c7e5280aa72..4636f30abba3f8e3e4770280dec04ff32e7debdd 100644 (file)
@@ -75,17 +75,6 @@ public class ChannelTypeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static ChannelTypeFeatures known() {
-               long ret = bindings.ChannelTypeFeatures_known();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index 918a146de2d55259db4850bee11712cbaff12930..784f1754ddf7e0972bc28412ae6fd97a9cbf51d9 100644 (file)
@@ -92,6 +92,23 @@ public class ChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelUpdate b) {
+               boolean ret = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelUpdate)) return false;
+               return this.eq((ChannelUpdate)o);
+       }
        /**
         * Serialize the ChannelUpdate object into a byte array which can be read by ChannelUpdate_read
         */
index 2418490445dd14e85c9ca776ec7db77110832cf6..b485f3c006198e3ab447127ab7971b2d2e917b39 100644 (file)
@@ -205,6 +205,23 @@ public class ChannelUpdateInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelUpdateInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ChannelUpdateInfo b) {
+               boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelUpdateInfo)) return false;
+               return this.eq((ChannelUpdateInfo)o);
+       }
        /**
         * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
         */
index ab3a5478342f4a5967177388d549654fe106dbc5..eee1fcd1410476febf4b05bce040997bcf5bc6ce 100644 (file)
@@ -137,6 +137,23 @@ public class ClosingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosingSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ClosingSigned b) {
+               boolean ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ClosingSigned)) return false;
+               return this.eq((ClosingSigned)o);
+       }
        /**
         * Serialize the ClosingSigned object into a byte array which can be read by ClosingSigned_read
         */
index af09be45668860b85d4b6c2244c814894b790a20..5c238244c2291c41b8748a4b303a511db9cae916 100644 (file)
@@ -93,6 +93,23 @@ public class ClosingSignedFeeRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosingSignedFeeRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ClosingSignedFeeRange b) {
+               boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ClosingSignedFeeRange)) return false;
+               return this.eq((ClosingSignedFeeRange)o);
+       }
        /**
         * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
         */
index 90494ac9f4dfa2c75e6696d14deb906c11de0fd2..0ac6fc601ea4d729bc162b9b0b85aa0894d58ae8 100644 (file)
@@ -54,6 +54,23 @@ public class ClosingTransaction extends CommonBase {
        @Override public int hashCode() {
                return (int)this.hash();
        }
+       /**
+        * Checks if two ClosingTransactions contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ClosingTransaction b) {
+               boolean ret = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ClosingTransaction)) return false;
+               return this.eq((ClosingTransaction)o);
+       }
        /**
         * Construct an object of the class
         */
index 800deb56e6b5b59bb7a9b15a8994064ee5c4b9a5..7c95760323ef93e4c840981b5ce75e8d4137e9bf 100644 (file)
@@ -122,8 +122,13 @@ public class ClosureReason extends CommonBase {
         * The peer disconnected prior to funding completing. In this case the spec mandates that we
         * forget the channel entirely - we can attempt again if the peer reconnects.
         * 
+        * This includes cases where we restarted prior to funding completion, including prior to the
+        * initial [`ChannelMonitor`] persistence completing.
+        * 
         * In LDK versions prior to 0.0.107 this could also occur if we were unable to connect to the
         * peer because of mutual incompatibility between us and our channel counterparty.
+        * 
+        * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
         */
        public final static class DisconnectedPeer extends ClosureReason {
                private DisconnectedPeer(long ptr, bindings.LDKClosureReason.DisconnectedPeer obj) {
@@ -131,8 +136,11 @@ public class ClosureReason extends CommonBase {
                }
        }
        /**
-        * Closure generated from `ChannelManager::read` if the ChannelMonitor is newer than
-        * the ChannelManager deserialized.
+        * Closure generated from `ChannelManager::read` if the [`ChannelMonitor`] is newer than
+        * the [`ChannelManager`] deserialized.
+        * 
+        * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
        public final static class OutdatedChannelManager extends ClosureReason {
                private OutdatedChannelManager(long ptr, bindings.LDKClosureReason.OutdatedChannelManager obj) {
@@ -247,6 +255,21 @@ public class ClosureReason extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosureReasons contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(ClosureReason b) {
+               boolean ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ClosureReason)) return false;
+               return this.eq((ClosureReason)o);
+       }
        /**
         * Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
         */
index 6102f3755994638c0e71e9020bde8b1e802e5b1c..a0207f079a3875cd833e7a51a37e626e10f19274 100644 (file)
@@ -108,6 +108,23 @@ public class CommitmentSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two CommitmentSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(CommitmentSigned b) {
+               boolean ret = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof CommitmentSigned)) return false;
+               return this.eq((CommitmentSigned)o);
+       }
        /**
         * Serialize the CommitmentSigned object into a byte array which can be read by CommitmentSigned_read
         */
index e2b705ee717ad3506ff8533a24d83cd4acacc128..babcd3c4cd96d6bea0e9db6c5a88a4166c862fa6 100644 (file)
@@ -219,4 +219,21 @@ public class CommitmentUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two CommitmentUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(CommitmentUpdate b) {
+               boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof CommitmentUpdate)) return false;
+               return this.eq((CommitmentUpdate)o);
+       }
 }
diff --git a/src/main/java/org/ldk/structs/CustomOnionMessageContents.java b/src/main/java/org/ldk/structs/CustomOnionMessageContents.java
new file mode 100644 (file)
index 0000000..79edade
--- /dev/null
@@ -0,0 +1,90 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * The contents of a custom onion message.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CustomOnionMessageContents extends CommonBase {
+       final bindings.LDKCustomOnionMessageContents bindings_instance;
+       CustomOnionMessageContents(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private CustomOnionMessageContents(bindings.LDKCustomOnionMessageContents arg) {
+               super(bindings.LDKCustomOnionMessageContents_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CustomOnionMessageContents_free(ptr); } super.finalize();
+       }
+
+       public static interface CustomOnionMessageContentsInterface {
+               /**
+                * Returns the TLV type identifying the message contents. MUST be >= 64.
+                */
+               long tlv_type();
+               /**
+                * Serialize the object into a byte array
+                */
+               byte[] write();
+       }
+       private static class LDKCustomOnionMessageContentsHolder { CustomOnionMessageContents held; }
+       public static CustomOnionMessageContents new_impl(CustomOnionMessageContentsInterface arg) {
+               final LDKCustomOnionMessageContentsHolder impl_holder = new LDKCustomOnionMessageContentsHolder();
+               impl_holder.held = new CustomOnionMessageContents(new bindings.LDKCustomOnionMessageContents() {
+                       @Override public long tlv_type() {
+                               long ret = arg.tlv_type();
+                               Reference.reachabilityFence(arg);
+                               return ret;
+                       }
+                       @Override public byte[] write() {
+                               byte[] ret = arg.write();
+                               Reference.reachabilityFence(arg);
+                               return ret;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Returns the TLV type identifying the message contents. MUST be >= 64.
+        */
+       public long tlv_type() {
+               long ret = bindings.CustomOnionMessageContents_tlv_type(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Serialize the object into a byte array
+        */
+       public byte[] write() {
+               byte[] ret = bindings.CustomOnionMessageContents_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CustomOnionMessageContents_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of a CustomOnionMessageContents
+        */
+       public CustomOnionMessageContents clone() {
+               long ret = bindings.CustomOnionMessageContents_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               CustomOnionMessageContents ret_hu_conv = new CustomOnionMessageContents(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java b/src/main/java/org/ldk/structs/CustomOnionMessageHandler.java
new file mode 100644 (file)
index 0000000..1cf4f38
--- /dev/null
@@ -0,0 +1,90 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`],
+ * [`SimpleRefOnionMessenger`], or prefer to ignore inbound custom onion messages,
+ * [`IgnoringMessageHandler`] must be provided to [`OnionMessenger::new`]. Otherwise, a custom
+ * implementation of this trait must be provided, with [`CustomMessage`] specifying the supported
+ * message types.
+ * 
+ * See [`OnionMessenger`] for example usage.
+ * 
+ * [`IgnoringMessageHandler`]: crate::ln::peer_handler::IgnoringMessageHandler
+ * [`CustomMessage`]: Self::CustomMessage
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CustomOnionMessageHandler extends CommonBase {
+       final bindings.LDKCustomOnionMessageHandler bindings_instance;
+       CustomOnionMessageHandler(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private CustomOnionMessageHandler(bindings.LDKCustomOnionMessageHandler arg) {
+               super(bindings.LDKCustomOnionMessageHandler_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CustomOnionMessageHandler_free(ptr); } super.finalize();
+       }
+
+       public static interface CustomOnionMessageHandlerInterface {
+               /**
+                * Called with the custom message that was received.
+                */
+               void handle_custom_message(CustomOnionMessageContents msg);
+               /**
+                * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+                * message type is unknown.
+                */
+               Result_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message(long message_type, byte[] buffer);
+       }
+       private static class LDKCustomOnionMessageHandlerHolder { CustomOnionMessageHandler held; }
+       public static CustomOnionMessageHandler new_impl(CustomOnionMessageHandlerInterface arg) {
+               final LDKCustomOnionMessageHandlerHolder impl_holder = new LDKCustomOnionMessageHandlerHolder();
+               impl_holder.held = new CustomOnionMessageHandler(new bindings.LDKCustomOnionMessageHandler() {
+                       @Override public void handle_custom_message(long msg) {
+                               CustomOnionMessageContents ret_hu_conv = new CustomOnionMessageContents(null, msg);
+                               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+                               arg.handle_custom_message(ret_hu_conv);
+                               Reference.reachabilityFence(arg);
+                       }
+                       @Override public long read_custom_message(long message_type, byte[] buffer) {
+                               Result_COption_CustomOnionMessageContentsZDecodeErrorZ ret = arg.read_custom_message(message_type, buffer);
+                               Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Called with the custom message that was received.
+        */
+       public void handle_custom_message(CustomOnionMessageContents msg) {
+               bindings.CustomOnionMessageHandler_handle_custom_message(this.ptr, msg == null ? 0 : msg.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(msg);
+               if (this != null) { this.ptrs_to.add(msg); };
+       }
+
+       /**
+        * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+        * message type is unknown.
+        */
+       public Result_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message(long message_type, byte[] buffer) {
+               long ret = bindings.CustomOnionMessageHandler_read_custom_message(this.ptr, message_type, buffer);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(message_type);
+               Reference.reachabilityFence(buffer);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_CustomOnionMessageContentsZDecodeErrorZ ret_hu_conv = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index a4645845b795aafca162d37640b7157cda578d45..2b68a20a0cdc9c1a80cc3b7d969dcac97eca16d5 100644 (file)
@@ -92,4 +92,21 @@ public class DataLossProtect extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two DataLossProtects contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(DataLossProtect b) {
+               boolean ret = bindings.DataLossProtect_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof DataLossProtect)) return false;
+               return this.eq((DataLossProtect)o);
+       }
 }
index 1fd7d4a33eab5257c3e2bb310749c92acf774ddc..69d91e70bdc7a671fbfde9d8cedf841d506c036f 100644 (file)
@@ -13,13 +13,99 @@ import javax.annotation.Nullable;
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class DecodeError extends CommonBase {
-       DecodeError(Object _dummy, long ptr) { super(ptr); }
+       private DecodeError(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
                if (ptr != 0) { bindings.DecodeError_free(ptr); }
        }
+       static DecodeError constr_from_ptr(long ptr) {
+               bindings.LDKDecodeError raw_val = bindings.LDKDecodeError_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKDecodeError.UnknownVersion.class) {
+                       return new UnknownVersion(ptr, (bindings.LDKDecodeError.UnknownVersion)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.UnknownRequiredFeature.class) {
+                       return new UnknownRequiredFeature(ptr, (bindings.LDKDecodeError.UnknownRequiredFeature)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.InvalidValue.class) {
+                       return new InvalidValue(ptr, (bindings.LDKDecodeError.InvalidValue)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.ShortRead.class) {
+                       return new ShortRead(ptr, (bindings.LDKDecodeError.ShortRead)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.BadLengthDescriptor.class) {
+                       return new BadLengthDescriptor(ptr, (bindings.LDKDecodeError.BadLengthDescriptor)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.Io.class) {
+                       return new Io(ptr, (bindings.LDKDecodeError.Io)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKDecodeError.UnsupportedCompression.class) {
+                       return new UnsupportedCompression(ptr, (bindings.LDKDecodeError.UnsupportedCompression)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
 
+       /**
+        * A version byte specified something we don't know how to handle.
+        * Includes unknown realm byte in an OnionHopData packet
+        */
+       public final static class UnknownVersion extends DecodeError {
+               private UnknownVersion(long ptr, bindings.LDKDecodeError.UnknownVersion obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Unknown feature mandating we fail to parse message (eg TLV with an even, unknown type)
+        */
+       public final static class UnknownRequiredFeature extends DecodeError {
+               private UnknownRequiredFeature(long ptr, bindings.LDKDecodeError.UnknownRequiredFeature obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Value was invalid, eg a byte which was supposed to be a bool was something other than a 0
+        * or 1, a public key/private key/signature was invalid, text wasn't UTF-8, TLV was
+        * syntactically incorrect, etc
+        */
+       public final static class InvalidValue extends DecodeError {
+               private InvalidValue(long ptr, bindings.LDKDecodeError.InvalidValue obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Buffer too short
+        */
+       public final static class ShortRead extends DecodeError {
+               private ShortRead(long ptr, bindings.LDKDecodeError.ShortRead obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * A length descriptor in the packet didn't describe the later data correctly
+        */
+       public final static class BadLengthDescriptor extends DecodeError {
+               private BadLengthDescriptor(long ptr, bindings.LDKDecodeError.BadLengthDescriptor obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Error from std::io
+        */
+       public final static class Io extends DecodeError {
+               public final org.ldk.enums.IOError io;
+               private Io(long ptr, bindings.LDKDecodeError.Io obj) {
+                       super(null, ptr);
+                       this.io = obj.io;
+               }
+       }
+       /**
+        * The message included zlib-compressed values, which we don't support.
+        */
+       public final static class UnsupportedCompression extends DecodeError {
+               private UnsupportedCompression(long ptr, bindings.LDKDecodeError.UnsupportedCompression obj) {
+                       super(null, ptr);
+               }
+       }
        long clone_ptr() {
                long ret = bindings.DecodeError_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -33,9 +119,102 @@ public class DecodeError extends CommonBase {
                long ret = bindings.DecodeError_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.DecodeError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DecodeError(null, ret); }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UnknownVersion-variant DecodeError
+        */
+       public static DecodeError unknown_version() {
+               long ret = bindings.DecodeError_unknown_version();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new UnknownRequiredFeature-variant DecodeError
+        */
+       public static DecodeError unknown_required_feature() {
+               long ret = bindings.DecodeError_unknown_required_feature();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new InvalidValue-variant DecodeError
+        */
+       public static DecodeError invalid_value() {
+               long ret = bindings.DecodeError_invalid_value();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new ShortRead-variant DecodeError
+        */
+       public static DecodeError short_read() {
+               long ret = bindings.DecodeError_short_read();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new BadLengthDescriptor-variant DecodeError
+        */
+       public static DecodeError bad_length_descriptor() {
+               long ret = bindings.DecodeError_bad_length_descriptor();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Io-variant DecodeError
+        */
+       public static DecodeError io(org.ldk.enums.IOError a) {
+               long ret = bindings.DecodeError_io(a);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new UnsupportedCompression-variant DecodeError
+        */
+       public static DecodeError unsupported_compression() {
+               long ret = bindings.DecodeError_unsupported_compression();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two DecodeErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(DecodeError b) {
+               boolean ret = bindings.DecodeError_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof DecodeError)) return false;
+               return this.eq((DecodeError)o);
+       }
 }
index 7ba24726b1fc5ea457925b27615877e424c21294..e4d9f5efa8a3d32b1e3145c9c7b2a5d1869ec36c 100644 (file)
@@ -200,6 +200,23 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two DelayedPaymentOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(DelayedPaymentOutputDescriptor b) {
+               boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof DelayedPaymentOutputDescriptor)) return false;
+               return this.eq((DelayedPaymentOutputDescriptor)o);
+       }
        /**
         * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read
         */
index 6410b718c7c97d40b3cfedca9fb4b686e577c676..18a4d4bde5633dc39e4a83155db25e1d8e09344f 100644 (file)
@@ -99,6 +99,23 @@ public class ErrorMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ErrorMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ErrorMessage b) {
+               boolean ret = bindings.ErrorMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ErrorMessage)) return false;
+               return this.eq((ErrorMessage)o);
+       }
        /**
         * Serialize the ErrorMessage object into a byte array which can be read by ErrorMessage_read
         */
index a187cb5073b930b357eac7e7ee9eecb4a5afeac2..2d0d08052e0b136bd0de28a5051e70cec5a479b2 100644 (file)
@@ -81,7 +81,7 @@ public class ExpiryTime extends CommonBase {
        }
 
        /**
-        * Construct an `ExpiryTime` from a `Duration`.
+        * Construct an `ExpiryTime` from a `Duration`, dropping the sub-second part.
         */
        public static ExpiryTime from_duration(long duration) {
                long ret = bindings.ExpiryTime_from_duration(duration);
index 9a418d46a9023b6ef9528f921757f5e57f54bffd..f26427c2c056a35ffdeb855df77effab055840cd 100644 (file)
@@ -23,9 +23,9 @@ import javax.annotation.Nullable;
  * Note that use as part of a [`Watch`] implementation involves reentrancy. Therefore, the `Filter`
  * should not block on I/O. Implementations should instead queue the newly monitored data to be
  * processed later. Then, in order to block until the data has been processed, any [`Watch`]
- * invocation that has called the `Filter` must return [`TemporaryFailure`].
+ * invocation that has called the `Filter` must return [`InProgress`].
  * 
- * [`TemporaryFailure`]: ChannelMonitorUpdateErr::TemporaryFailure
+ * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
  * [BIP 157]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
  * [BIP 158]: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki
  */
index e83050b80b48648b33825dec9dda912e1f6f806e..bb45b88bff8f30be0d4b8e3a395f0da9781a2893 100644 (file)
@@ -125,6 +125,23 @@ public class FundingCreated extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two FundingCreateds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(FundingCreated b) {
+               boolean ret = bindings.FundingCreated_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof FundingCreated)) return false;
+               return this.eq((FundingCreated)o);
+       }
        /**
         * Serialize the FundingCreated object into a byte array which can be read by FundingCreated_read
         */
index 6824a503a02efd5a43a6f383c40b6c4cc6c5ddff..9b2f3f5fdc4f17cb9d36ec206dc21b9e0af3c2e1 100644 (file)
@@ -87,6 +87,23 @@ public class FundingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two FundingSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(FundingSigned b) {
+               boolean ret = bindings.FundingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof FundingSigned)) return false;
+               return this.eq((FundingSigned)o);
+       }
        /**
         * Serialize the FundingSigned object into a byte array which can be read by FundingSigned_read
         */
index a98ee54707a5008760d0ac7bf153c568e7b85a7d..ac7b20f3b8af0c0cac30635270385173b00c021b 100644 (file)
@@ -108,6 +108,23 @@ public class GossipTimestampFilter extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two GossipTimestampFilters contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(GossipTimestampFilter b) {
+               boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof GossipTimestampFilter)) return false;
+               return this.eq((GossipTimestampFilter)o);
+       }
        /**
         * Serialize the GossipTimestampFilter object into a byte array which can be read by GossipTimestampFilter_read
         */
index 783870b0616b3c4a654e8a2f876d23f5fa6c5839..368c6170d1d800e04200078a8094165b014c3b50 100644 (file)
@@ -39,7 +39,7 @@ public class GraphSyncError extends CommonBase {
                private DecodeError(long ptr, bindings.LDKGraphSyncError.DecodeError obj) {
                        super(null, ptr);
                        long decode_error = obj.decode_error;
-                       org.ldk.structs.DecodeError decode_error_hu_conv = null; if (decode_error < 0 || decode_error > 4096) { decode_error_hu_conv = new org.ldk.structs.DecodeError(null, decode_error); }
+                       org.ldk.structs.DecodeError decode_error_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(decode_error);
                        if (decode_error_hu_conv != null) { decode_error_hu_conv.ptrs_to.add(this); };
                        this.decode_error = decode_error_hu_conv;
                }
@@ -80,12 +80,11 @@ public class GraphSyncError extends CommonBase {
         * Utility method to constructs a new DecodeError-variant GraphSyncError
         */
        public static GraphSyncError decode_error(DecodeError a) {
-               long ret = bindings.GraphSyncError_decode_error(a == null ? 0 : a.ptr);
+               long ret = bindings.GraphSyncError_decode_error(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.GraphSyncError ret_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
                return ret_hu_conv;
        }
 
index b7e8801792f3efbe8a91586fe4cbaab0dea00384..8d0c94bd63521c110c339ec3190e8fe247f2019b 100644 (file)
@@ -143,6 +143,21 @@ public class HTLCDestination extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCDestinations contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(HTLCDestination b) {
+               boolean ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof HTLCDestination)) return false;
+               return this.eq((HTLCDestination)o);
+       }
        /**
         * Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
         */
index c6c0b8fd7258f3c6636a6ee1b55c5b19c715be84..7936b2a8208b5e78c303f44f3a7c1cf226ac33a5 100644 (file)
@@ -159,6 +159,23 @@ public class HTLCOutputInCommitment extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCOutputInCommitments contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(HTLCOutputInCommitment b) {
+               boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof HTLCOutputInCommitment)) return false;
+               return this.eq((HTLCOutputInCommitment)o);
+       }
        /**
         * Serialize the HTLCOutputInCommitment object into a byte array which can be read by HTLCOutputInCommitment_read
         */
index 9a125b9b06129f80e6aa510fd995828df5d82862..ccf422ece9a655970952e061047543c14b039ed5 100644 (file)
@@ -40,6 +40,23 @@ public class HTLCUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(HTLCUpdate b) {
+               boolean ret = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof HTLCUpdate)) return false;
+               return this.eq((HTLCUpdate)o);
+       }
        /**
         * Serialize the HTLCUpdate object into a byte array which can be read by HTLCUpdate_read
         */
index afe13a63baa1cfae0bd22788546572ed7923696e..64994b72d1bd9a51ea4261177bf0b953540f1f5d 100644 (file)
@@ -42,6 +42,23 @@ public class Hostname extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Hostnames contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Hostname b) {
+               boolean ret = bindings.Hostname_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Hostname)) return false;
+               return this.eq((Hostname)o);
+       }
        /**
         * Returns the length of the hostname.
         */
index 4acc9c5d9538d2a9a60afcf5a60f389a920cfda7..2a7cefc5057420a008703600ad472d9195e55951 100644 (file)
@@ -84,6 +84,19 @@ public class IgnoringMessageHandler extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Constructs a new CustomOnionMessageHandler which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned CustomOnionMessageHandler must be freed before this_arg is
+        */
+       public CustomOnionMessageHandler as_CustomOnionMessageHandler() {
+               long ret = bindings.IgnoringMessageHandler_as_CustomOnionMessageHandler(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               CustomOnionMessageHandler ret_hu_conv = new CustomOnionMessageHandler(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Constructs a new CustomMessageReader which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned CustomMessageReader must be freed before this_arg is
index dabee4dcb675d7dcc2a4634ba2c6fba4c275f81a..767ecfd36d93adfc9ce579b3ff93218ddb2628c7 100644 (file)
@@ -101,6 +101,23 @@ public class Init extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Inits contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Init b) {
+               boolean ret = bindings.Init_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Init)) return false;
+               return this.eq((Init)o);
+       }
        /**
         * Serialize the Init object into a byte array which can be read by Init_read
         */
index b6d59fdaaea27a7f1812dc562e78f464336765f3..d6effca4b92566e43150463861f1cb32b2d0e5cd 100644 (file)
@@ -55,18 +55,6 @@ public class InitFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Returns the set of known init features that are related to channels. At least some of
-        * these features are likely required for peers to talk to us.
-        */
-       public static InitFeatures known_channel_features() {
-               long ret = bindings.InitFeatures_known_channel_features();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Create a blank Features with no features set
         */
@@ -78,17 +66,6 @@ public class InitFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static InitFeatures known() {
-               long ret = bindings.InitFeatures_known();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index f0d08ac859177a6fa522831513edb62098213de1..f70294f5b136abcdc644702a33211bb569251c12 100644 (file)
@@ -66,17 +66,6 @@ public class InvoiceFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static InvoiceFeatures known() {
-               long ret = bindings.InvoiceFeatures_known();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.InvoiceFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index bc3aaf5645d7f62d67a373c0e2ffbd8a33a22d2c..8a9a4b132b9cca90343a2987a46a511fbef46078 100644 (file)
@@ -32,13 +32,29 @@ public class KeysInterface extends CommonBase {
                 * 
                 * This method must return the same value each time it is called with a given `Recipient`
                 * parameter.
+                * 
+                * Errors if the `Recipient` variant is not supported by the implementation.
                 */
                Result_SecretKeyNoneZ get_node_secret(Recipient recipient);
+               /**
+                * Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+                * [`get_node_secret`].
+                * 
+                * This method must return the same value each time it is called with a given `Recipient`
+                * parameter.
+                * 
+                * Errors if the `Recipient` variant is not supported by the implementation.
+                * 
+                * [`get_node_secret`]: KeysInterface::get_node_secret
+                */
+               Result_PublicKeyNoneZ get_node_id(Recipient recipient);
                /**
                 * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
                 * one is provided. Note that this tweak can be applied to `other_key` instead of our node
                 * secret, though this is less efficient.
                 * 
+                * Errors if the `Recipient` variant is not supported by the implementation.
+                * 
                 * [`node secret`]: Self::get_node_secret
                 */
                Result_SharedSecretNoneZ ecdh(Recipient recipient, byte[] other_key, Option_ScalarZ tweak);
@@ -88,6 +104,8 @@ public class KeysInterface extends CommonBase {
                 * The hrp is ascii bytes, while the invoice data is base32.
                 * 
                 * The secret key used to sign the invoice is dependent on the [`Recipient`].
+                * 
+                * Errors if the `Recipient` variant is not supported by the implementation.
                 */
                Result_RecoverableSignatureNoneZ sign_invoice(byte[] hrp_bytes, UInt5[] invoice_data, Recipient receipient);
                /**
@@ -113,6 +131,12 @@ public class KeysInterface extends CommonBase {
                                long result = ret == null ? 0 : ret.clone_ptr();
                                return result;
                        }
+                       @Override public long get_node_id(Recipient recipient) {
+                               Result_PublicKeyNoneZ ret = arg.get_node_id(recipient);
+                               Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
+                       }
                        @Override public long ecdh(Recipient recipient, byte[] other_key, long tweak) {
                                org.ldk.structs.Option_ScalarZ tweak_hu_conv = org.ldk.structs.Option_ScalarZ.constr_from_ptr(tweak);
                                if (tweak_hu_conv != null) { tweak_hu_conv.ptrs_to.add(this); };
@@ -180,6 +204,8 @@ public class KeysInterface extends CommonBase {
         * 
         * This method must return the same value each time it is called with a given `Recipient`
         * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        public Result_SecretKeyNoneZ get_node_secret(org.ldk.enums.Recipient recipient) {
                long ret = bindings.KeysInterface_get_node_secret(this.ptr, recipient);
@@ -190,11 +216,33 @@ public class KeysInterface extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+        * [`get_node_secret`].
+        * 
+        * This method must return the same value each time it is called with a given `Recipient`
+        * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
+        * [`get_node_secret`]: KeysInterface::get_node_secret
+        */
+       public Result_PublicKeyNoneZ get_node_id(org.ldk.enums.Recipient recipient) {
+               long ret = bindings.KeysInterface_get_node_id(this.ptr, recipient);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(recipient);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PublicKeyNoneZ ret_hu_conv = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
         * one is provided. Note that this tweak can be applied to `other_key` instead of our node
         * secret, though this is less efficient.
         * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
         * [`node secret`]: Self::get_node_secret
         */
        public Result_SharedSecretNoneZ ecdh(org.ldk.enums.Recipient recipient, byte[] other_key, Option_ScalarZ tweak) {
@@ -290,6 +338,8 @@ public class KeysInterface extends CommonBase {
         * The hrp is ascii bytes, while the invoice data is base32.
         * 
         * The secret key used to sign the invoice is dependent on the [`Recipient`].
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        public Result_RecoverableSignatureNoneZ sign_invoice(byte[] hrp_bytes, UInt5[] invoice_data, org.ldk.enums.Recipient receipient) {
                long ret = bindings.KeysInterface_sign_invoice(this.ptr, hrp_bytes, invoice_data != null ? InternalUtils.convUInt5Array(invoice_data) : null, receipient);
index 87da2ac80df1d522787f8f27b801295d944771c9..dec1118f8ca22ea937e9ba3a2b275f462ad1c52b 100644 (file)
@@ -27,8 +27,8 @@ public class MonitorEvent extends CommonBase {
                if (raw_val.getClass() == bindings.LDKMonitorEvent.CommitmentTxConfirmed.class) {
                        return new CommitmentTxConfirmed(ptr, (bindings.LDKMonitorEvent.CommitmentTxConfirmed)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKMonitorEvent.UpdateCompleted.class) {
-                       return new UpdateCompleted(ptr, (bindings.LDKMonitorEvent.UpdateCompleted)raw_val);
+               if (raw_val.getClass() == bindings.LDKMonitorEvent.Completed.class) {
+                       return new Completed(ptr, (bindings.LDKMonitorEvent.Completed)raw_val);
                }
                if (raw_val.getClass() == bindings.LDKMonitorEvent.UpdateFailed.class) {
                        return new UpdateFailed(ptr, (bindings.LDKMonitorEvent.UpdateFailed)raw_val);
@@ -64,11 +64,11 @@ public class MonitorEvent extends CommonBase {
        }
        /**
         * Indicates a [`ChannelMonitor`] update has completed. See
-        * [`ChannelMonitorUpdateErr::TemporaryFailure`] for more information on how this is used.
+        * [`ChannelMonitorUpdateStatus::InProgress`] for more information on how this is used.
         * 
-        * [`ChannelMonitorUpdateErr::TemporaryFailure`]: super::ChannelMonitorUpdateErr::TemporaryFailure
+        * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
         */
-       public final static class UpdateCompleted extends MonitorEvent {
+       public final static class Completed extends MonitorEvent {
                /**
                 * The funding outpoint of the [`ChannelMonitor`] that was updated
                */
@@ -81,7 +81,7 @@ public class MonitorEvent extends CommonBase {
                 * same [`ChannelMonitor`] have been applied and persisted.
                */
                public final long monitor_update_id;
-               private UpdateCompleted(long ptr, bindings.LDKMonitorEvent.UpdateCompleted obj) {
+               private Completed(long ptr, bindings.LDKMonitorEvent.Completed obj) {
                        super(null, ptr);
                        long funding_txo = obj.funding_txo;
                        org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
@@ -92,9 +92,9 @@ public class MonitorEvent extends CommonBase {
        }
        /**
         * Indicates a [`ChannelMonitor`] update has failed. See
-        * [`ChannelMonitorUpdateErr::PermanentFailure`] for more information on how this is used.
+        * [`ChannelMonitorUpdateStatus::PermanentFailure`] for more information on how this is used.
         * 
-        * [`ChannelMonitorUpdateErr::PermanentFailure`]: super::ChannelMonitorUpdateErr::PermanentFailure
+        * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
         */
        public final static class UpdateFailed extends MonitorEvent {
                public final org.ldk.structs.OutPoint update_failed;
@@ -151,10 +151,10 @@ public class MonitorEvent extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new UpdateCompleted-variant MonitorEvent
+        * Utility method to constructs a new Completed-variant MonitorEvent
         */
-       public static MonitorEvent update_completed(OutPoint funding_txo, long monitor_update_id) {
-               long ret = bindings.MonitorEvent_update_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id);
+       public static MonitorEvent completed(OutPoint funding_txo, long monitor_update_id) {
+               long ret = bindings.MonitorEvent_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(monitor_update_id);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -177,6 +177,21 @@ public class MonitorEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two MonitorEvents contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(MonitorEvent b) {
+               boolean ret = bindings.MonitorEvent_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof MonitorEvent)) return false;
+               return this.eq((MonitorEvent)o);
+       }
        /**
         * Serialize the MonitorEvent object into a byte array which can be read by MonitorEvent_read
         */
index 74ccb308db826e7627c35fb2dba03d0a742e2dfd..f4f729ffc3c11686e6441b9838faa6291613daae 100644 (file)
@@ -224,6 +224,21 @@ public class NetAddress extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetAddresss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(NetAddress b) {
+               boolean ret = bindings.NetAddress_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NetAddress)) return false;
+               return this.eq((NetAddress)o);
+       }
        /**
         * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
         */
index a935fb38d13be04c1b9e2c7e99ba6759c297fc0f..e3414f4821f84e58704d876793e15e918fc910c3 100644 (file)
@@ -216,13 +216,13 @@ public class NetworkGraph extends CommonBase {
        }
 
        /**
-        * Marks a node in the graph as failed.
+        * Marks a node in the graph as permanently failed, effectively removing it and its channels
+        * from local storage.
         */
-       public void node_failed(byte[] _node_id, boolean is_permanent) {
-               bindings.NetworkGraph_node_failed(this.ptr, InternalUtils.check_arr_len(_node_id, 33), is_permanent);
+       public void node_failed_permanent(byte[] node_id) {
+               bindings.NetworkGraph_node_failed_permanent(this.ptr, InternalUtils.check_arr_len(node_id, 33));
                Reference.reachabilityFence(this);
-               Reference.reachabilityFence(_node_id);
-               Reference.reachabilityFence(is_permanent);
+               Reference.reachabilityFence(node_id);
        }
 
        /**
@@ -237,11 +237,14 @@ public class NetworkGraph extends CommonBase {
         * Note that for users of the `lightning-background-processor` crate this method may be
         * automatically called regularly for you.
         * 
+        * This method will also cause us to stop tracking removed nodes and channels if they have been
+        * in the map for a while so that these can be resynced from gossip in the future.
+        * 
         * This method is only available with the `std` feature. See
-        * [`NetworkGraph::remove_stale_channels_with_time`] for `no-std` use.
+        * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for `no-std` use.
         */
-       public void remove_stale_channels() {
-               bindings.NetworkGraph_remove_stale_channels(this.ptr);
+       public void remove_stale_channels_and_tracking() {
+               bindings.NetworkGraph_remove_stale_channels_and_tracking(this.ptr);
                Reference.reachabilityFence(this);
        }
 
@@ -254,11 +257,14 @@ public class NetworkGraph extends CommonBase {
         * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
         * pruning occur for updates which are at least two weeks old, which we implement here.
         * 
+        * This method will also cause us to stop tracking removed nodes and channels if they have been
+        * in the map for a while so that these can be resynced from gossip in the future.
+        * 
         * This function takes the current unix time as an argument. For users with the `std` feature
-        * enabled, [`NetworkGraph::remove_stale_channels`] may be preferable.
+        * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
         */
-       public void remove_stale_channels_with_time(long current_time_unix) {
-               bindings.NetworkGraph_remove_stale_channels_with_time(this.ptr, current_time_unix);
+       public void remove_stale_channels_and_tracking_with_time(long current_time_unix) {
+               bindings.NetworkGraph_remove_stale_channels_and_tracking_with_time(this.ptr, current_time_unix);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(current_time_unix);
        }
index 438a26fa31e8593b19b188ed83bd956cf94af2ed..60d3bfd58f71f93eae85353a03e812ba7110ffee 100644 (file)
@@ -75,7 +75,7 @@ public class NetworkUpdate extends CommonBase {
        }
        /**
         * An error indicating that a node failed to route a payment, which should be applied via
-        * [`NetworkGraph::node_failed`].
+        * [`NetworkGraph::node_failed_permanent`] if permanent.
         */
        public final static class NodeFailure extends NetworkUpdate {
                /**
@@ -150,6 +150,21 @@ public class NetworkUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetworkUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(NetworkUpdate b) {
+               boolean ret = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NetworkUpdate)) return false;
+               return this.eq((NetworkUpdate)o);
+       }
        /**
         * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
         */
index d86743edb5f7c733ab4f583b34a6ee70b3387318..ca4dbe049fb7a3f83e6377dbe63263f5bbd60ddb 100644 (file)
@@ -65,6 +65,23 @@ public class NodeAlias extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAliass contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(NodeAlias b) {
+               boolean ret = bindings.NodeAlias_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NodeAlias)) return false;
+               return this.eq((NodeAlias)o);
+       }
        /**
         * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
         */
index e93443e8c0418bb730d99bdb48768fc6ad18525d..6f1799e4fc77af8ab7c5c031da7d165278a4dca3 100644 (file)
@@ -92,6 +92,23 @@ public class NodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(NodeAnnouncement b) {
+               boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NodeAnnouncement)) return false;
+               return this.eq((NodeAnnouncement)o);
+       }
        /**
         * Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
         */
index 565c82ce59aec431593c89dd0ebbf1a2530c1d6b..ce4fc6440914299d45d8e4e677b5cebeade5b5cd 100644 (file)
@@ -205,6 +205,23 @@ public class NodeAnnouncementInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAnnouncementInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(NodeAnnouncementInfo b) {
+               boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NodeAnnouncementInfo)) return false;
+               return this.eq((NodeAnnouncementInfo)o);
+       }
        /**
         * Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
         */
index e79460ab63eb0137d5284120bd00ef25663d67bb..37fd14611717ee3a9563013c4c6fd0c98ec71fa9 100644 (file)
@@ -55,17 +55,6 @@ public class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Returns the set of known node features that are related to channels.
-        */
-       public static NodeFeatures known_channel_features() {
-               long ret = bindings.NodeFeatures_known_channel_features();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.NodeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Create a blank Features with no features set
         */
@@ -77,17 +66,6 @@ public class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static NodeFeatures known() {
-               long ret = bindings.NodeFeatures_known();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.NodeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index 350d736470dac2abc6157675e89ad18f6680ee38..25d738834f25ff68174cfbb4fa8809bf29a4e16b 100644 (file)
@@ -136,6 +136,23 @@ public class NodeInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(NodeInfo b) {
+               boolean ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NodeInfo)) return false;
+               return this.eq((NodeInfo)o);
+       }
        /**
         * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
         */
index c091a266c4089315e50e3fd8ea98db281024a1d8..1c03a6b6e6ea984ed28a2df5a193669fd9c28257 100644 (file)
@@ -56,6 +56,23 @@ public class OnionMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two OnionMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(OnionMessage b) {
+               boolean ret = bindings.OnionMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof OnionMessage)) return false;
+               return this.eq((OnionMessage)o);
+       }
        /**
         * Read a OnionMessage from a byte array, created by OnionMessage_write
         */
index 418f2a6730534ffe0abe760b3b44606a912df52c..13c6ddfd8f204dc094c3dab20cbd73cc88dcf714 100644 (file)
@@ -33,11 +33,18 @@ public class OnionMessageHandler extends CommonBase {
                /**
                 * Called when a connection is established with a peer. Can be used to track which peers
                 * advertise onion message support and are online.
+                * 
+                * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+                * with us. Implementors should be somewhat conservative about doing so, however, as other
+                * message handlers may still wish to communicate with this peer.
                 */
-               void peer_connected(byte[] their_node_id, Init init);
+               Result_NoneNoneZ peer_connected(byte[] their_node_id, Init init);
                /**
                 * Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
                 * drop and refuse to forward onion messages to this peer.
+                * 
+                * Note that in some rare cases this may be called without a corresponding
+                * [`Self::peer_connected`].
                 */
                void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
                /**
@@ -64,10 +71,12 @@ public class OnionMessageHandler extends CommonBase {
                                arg.handle_onion_message(peer_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
                        }
-                       @Override public void peer_connected(byte[] their_node_id, long init) {
+                       @Override public long peer_connected(byte[] their_node_id, long init) {
                                org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
-                               arg.peer_connected(their_node_id, init_hu_conv);
+                               Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv);
                                Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
                        }
                        @Override public void peer_disconnected(byte[] their_node_id, boolean no_connection_possible) {
                                arg.peer_disconnected(their_node_id, no_connection_possible);
@@ -112,18 +121,28 @@ public class OnionMessageHandler extends CommonBase {
        /**
         * Called when a connection is established with a peer. Can be used to track which peers
         * advertise onion message support and are online.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public void peer_connected(byte[] their_node_id, Init init) {
-               bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr);
+       public Result_NoneNoneZ peer_connected(byte[] their_node_id, Init init) {
+               long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(init);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(init); };
+               return ret_hu_conv;
        }
 
        /**
         * Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
         * drop and refuse to forward onion messages to this peer.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        public void peer_disconnected(byte[] their_node_id, boolean no_connection_possible) {
                bindings.OnionMessageHandler_peer_disconnected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), no_connection_possible);
index 1c2f8899ac911fe96e56621d6c1c6098e186ed3a..23faf7ac17d474f0525b960334d93920f4d0735f 100644 (file)
@@ -11,7 +11,7 @@ import javax.annotation.Nullable;
 /**
  * A sender, receiver and forwarder of onion messages. In upcoming releases, this object will be
  * used to retrieve invoices and fulfill invoice requests from [offers]. Currently, only sending
- * and receiving empty onion messages is supported.
+ * and receiving custom onion messages is supported.
  * 
  * # Example
  * 
@@ -20,9 +20,14 @@ import javax.annotation.Nullable;
  * # use bitcoin::hashes::_export::_core::time::Duration;
  * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
  * # use lightning::chain::keysinterface::{InMemorySigner, KeysManager, KeysInterface};
+ * # use lightning::ln::msgs::DecodeError;
+ * # use lightning::ln::peer_handler::IgnoringMessageHandler;
  * # use lightning::onion_message::messenger::{Destination, OnionMessenger};
+ * # use lightning::onion_message::packet::CustomOnionMessageContents;
  * # use lightning::onion_message::blinded_route::BlindedRoute;
  * # use lightning::util::logger::{Logger, Record};
+ * # use lightning::util::ser::{Writeable, Writer};
+ * # use lightning::io;
  * # use std::sync::Arc;
  * # struct FakeLogger {};
  * # impl Logger for FakeLogger {
@@ -35,28 +40,43 @@ import javax.annotation.Nullable;
  * # let node_secret = SecretKey::from_slice(&hex::decode(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
  * # let secp_ctx = Secp256k1::new();
  * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
- * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1,
- * hop_node_id1);
+ * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1, hop_node_id1);
  * # let destination_node_id = hop_node_id1;
- * #
+ * # let your_custom_message_handler = IgnoringMessageHandler {};
  * Create the onion messenger. This must use the same `keys_manager` as is passed to your
  * ChannelManager.
- * let onion_messenger = OnionMessenger::new(&keys_manager, logger);
+ * let onion_messenger = OnionMessenger::new(&keys_manager, logger, your_custom_message_handler);
  * 
- * Send an empty onion message to a node id.
+ * # #[derive(Clone)]
+ * # struct YourCustomMessage {}
+ * impl Writeable for YourCustomMessage {
+ * \tfn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
+ * \t\t# Ok(())
+ * \t\t// Write your custom onion message to `w`
+ * \t}
+ * }
+ * impl CustomOnionMessageContents for YourCustomMessage {
+ * \tfn tlv_type(&self) -> u64 {
+ * \t\t# let your_custom_message_type = 42;
+ * \t\tyour_custom_message_type
+ * \t}
+ * }
+ * Send a custom onion message to a node id.
  * let intermediate_hops = [hop_node_id1, hop_node_id2];
  * let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::Node(destination_node_id), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::Node(destination_node_id), your_custom_message, reply_path);
  * 
  * Create a blinded route to yourself, for someone to send an onion message to.
  * # let your_node_id = hop_node_id1;
  * let hops = [hop_node_id3, hop_node_id4, your_node_id];
  * let blinded_route = BlindedRoute::new(&hops, &keys_manager, &secp_ctx).unwrap();
  * 
- * Send an empty onion message to a blinded route.
+ * Send a custom onion message to a blinded route.
  * # let intermediate_hops = [hop_node_id1, hop_node_id2];
  * let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), your_custom_message, reply_path);
  * ```
  * 
  * [offers]: <https://github.com/lightning/bolts/pull/798>
@@ -75,32 +95,36 @@ public class OnionMessenger extends CommonBase {
         * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
         * their respective handlers.
         */
-       public static OnionMessenger of(KeysInterface keys_manager, Logger logger) {
-               long ret = bindings.OnionMessenger_new(keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr);
+       public static OnionMessenger of(KeysInterface keys_manager, Logger logger, CustomOnionMessageHandler custom_handler) {
+               long ret = bindings.OnionMessenger_new(keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, custom_handler == null ? 0 : custom_handler.ptr);
                Reference.reachabilityFence(keys_manager);
                Reference.reachabilityFence(logger);
+               Reference.reachabilityFence(custom_handler);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OnionMessenger ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OnionMessenger(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(custom_handler); };
                return ret_hu_conv;
        }
 
        /**
-        * Send an empty onion message to `destination`, routing it through `intermediate_nodes`.
+        * Send an onion message with contents `message` to `destination`, routing it through `intermediate_nodes`.
         * See [`OnionMessenger`] for example usage.
         * 
         * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Result_NoneSendErrorZ send_onion_message(byte[][] intermediate_nodes, Destination destination, @Nullable BlindedRoute reply_path) {
-               long ret = bindings.OnionMessenger_send_onion_message(this.ptr, intermediate_nodes != null ? Arrays.stream(intermediate_nodes).map(intermediate_nodes_conv_8 -> InternalUtils.check_arr_len(intermediate_nodes_conv_8, 33)).toArray(byte[][]::new) : null, destination.ptr, reply_path == null ? 0 : reply_path.ptr);
+       public Result_NoneSendErrorZ send_custom_onion_message(byte[][] intermediate_nodes, Destination destination, CustomOnionMessageContents msg, @Nullable BlindedRoute reply_path) {
+               long ret = bindings.OnionMessenger_send_custom_onion_message(this.ptr, intermediate_nodes != null ? Arrays.stream(intermediate_nodes).map(intermediate_nodes_conv_8 -> InternalUtils.check_arr_len(intermediate_nodes_conv_8, 33)).toArray(byte[][]::new) : null, destination.ptr, msg == null ? 0 : msg.ptr, reply_path == null ? 0 : reply_path.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(intermediate_nodes);
                Reference.reachabilityFence(destination);
+               Reference.reachabilityFence(msg);
                Reference.reachabilityFence(reply_path);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneSendErrorZ ret_hu_conv = Result_NoneSendErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(msg); };
                if (this != null) { this.ptrs_to.add(reply_path); };
                return ret_hu_conv;
        }
index b76e941668c387eaf01060e8f57a681c002534c4..dab4f591e39be1ec28a344b872afbdcde35b8322 100644 (file)
@@ -393,6 +393,23 @@ public class OpenChannel extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two OpenChannels contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(OpenChannel b) {
+               boolean ret = bindings.OpenChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof OpenChannel)) return false;
+               return this.eq((OpenChannel)o);
+       }
        /**
         * Serialize the OpenChannel object into a byte array which can be read by OpenChannel_read
         */
diff --git a/src/main/java/org/ldk/structs/Option_CustomOnionMessageContentsZ.java b/src/main/java/org/ldk/structs/Option_CustomOnionMessageContentsZ.java
new file mode 100644 (file)
index 0000000..021b346
--- /dev/null
@@ -0,0 +1,97 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::onion_message::packet::CustomOnionMessageContents or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_CustomOnionMessageContentsZ extends CommonBase {
+       private Option_CustomOnionMessageContentsZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_CustomOnionMessageContentsZ_free(ptr); }
+       }
+       static Option_CustomOnionMessageContentsZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_CustomOnionMessageContentsZ raw_val = bindings.LDKCOption_CustomOnionMessageContentsZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_CustomOnionMessageContentsZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_CustomOnionMessageContentsZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_CustomOnionMessageContentsZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_CustomOnionMessageContentsZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * When we're in this state, this COption_CustomOnionMessageContentsZ contains a crate::lightning::onion_message::packet::CustomOnionMessageContents
+        */
+       public final static class Some extends Option_CustomOnionMessageContentsZ {
+               public final org.ldk.structs.CustomOnionMessageContents some;
+               private Some(long ptr, bindings.LDKCOption_CustomOnionMessageContentsZ.Some obj) {
+                       super(null, ptr);
+                       long some = obj.some;
+                       CustomOnionMessageContents ret_hu_conv = new CustomOnionMessageContents(null, some);
+                       if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+                       this.some = ret_hu_conv;
+               }
+       }
+       /**
+        * When we're in this state, this COption_CustomOnionMessageContentsZ contains nothing
+        */
+       public final static class None extends Option_CustomOnionMessageContentsZ {
+               private None(long ptr, bindings.LDKCOption_CustomOnionMessageContentsZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_CustomOnionMessageContentsZ containing a crate::lightning::onion_message::packet::CustomOnionMessageContents
+        */
+       public static Option_CustomOnionMessageContentsZ some(CustomOnionMessageContents o) {
+               long ret = bindings.COption_CustomOnionMessageContentsZ_some(o == null ? 0 : o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_CustomOnionMessageContentsZ ret_hu_conv = org.ldk.structs.Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_CustomOnionMessageContentsZ containing nothing
+        */
+       public static Option_CustomOnionMessageContentsZ none() {
+               long ret = bindings.COption_CustomOnionMessageContentsZ_none();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_CustomOnionMessageContentsZ ret_hu_conv = org.ldk.structs.Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.COption_CustomOnionMessageContentsZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_CustomOnionMessageContentsZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_CustomOnionMessageContentsZ clone() {
+               long ret = bindings.COption_CustomOnionMessageContentsZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_CustomOnionMessageContentsZ ret_hu_conv = org.ldk.structs.Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 4db3af08436d6e6283cff7e5fc4e8db5b80bbedf..4fcdc2a77d8e4c3fe51aead02af6849791c4dff4 100644 (file)
@@ -411,6 +411,21 @@ public class ParseError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ParseErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(ParseError b) {
+               boolean ret = bindings.ParseError_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ParseError)) return false;
+               return this.eq((ParseError)o);
+       }
        /**
         * Get the string representation of a ParseError object
         */
index 90273d62ff767638b3d80b7d8cd2f77c7db4034b..a6f4efe3a6c24bfee6439d72583bb9250fd462cb 100644 (file)
@@ -97,6 +97,21 @@ public class ParseOrSemanticError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ParseOrSemanticErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(ParseOrSemanticError b) {
+               boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ParseOrSemanticError)) return false;
+               return this.eq((ParseOrSemanticError)o);
+       }
        /**
         * Get the string representation of a ParseOrSemanticError object
         */
index 6a75063c7ded6854b52419ab5a1ce886b42e1efb..8d9ccef36b75de8db0a6d512ae07538e63daff00 100644 (file)
@@ -104,13 +104,13 @@ public class PaymentSendFailure extends CommonBase {
         * in over-/re-payment.
         * 
         * The results here are ordered the same as the paths in the route object which was passed to
-        * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely
-        * retried (though there is currently no API with which to do so).
+        * send_payment, and any `Err`s which are not [`APIError::MonitorUpdateInProgress`] can be
+        * safely retried via [`ChannelManager::retry_payment`].
         * 
-        * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried
-        * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the
-        * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel
-        * with the latest update_id.
+        * Any entries which contain `Err(APIError::MonitorUpdateInprogress)` or `Ok(())` MUST NOT be
+        * retried as they will result in over-/re-payment. These HTLCs all either successfully sent
+        * (in the case of `Ok(())`) or will send once a [`MonitorEvent::Completed`] is provided for
+        * the next-hop channel with the latest update_id.
         */
        public final static class PartialFailure extends PaymentSendFailure {
                /**
index 23ef8e347870666b845be8932e6d14acc24b7e46..ab061b202e95b396e0ff37b9f3156ae41e501718 100644 (file)
@@ -48,7 +48,7 @@ public class PeerManager extends CommonBase {
         * timestamp, however if it is not available a persistent counter that increases once per
         * minute should suffice.
         */
-       public static PeerManager of(ChannelMessageHandler message_handler_chan_handler_arg, RoutingMessageHandler message_handler_route_handler_arg, OnionMessageHandler message_handler_onion_message_handler_arg, byte[] our_node_secret, long current_time, byte[] ephemeral_random_data, Logger logger, CustomMessageHandler custom_message_handler) {
+       public static PeerManager of(ChannelMessageHandler message_handler_chan_handler_arg, RoutingMessageHandler message_handler_route_handler_arg, OnionMessageHandler message_handler_onion_message_handler_arg, byte[] our_node_secret, int current_time, byte[] ephemeral_random_data, Logger logger, CustomMessageHandler custom_message_handler) {
                long ret = bindings.PeerManager_new(bindings.MessageHandler_new(message_handler_chan_handler_arg == null ? 0 : message_handler_chan_handler_arg.ptr, message_handler_route_handler_arg == null ? 0 : message_handler_route_handler_arg.ptr, message_handler_onion_message_handler_arg == null ? 0 : message_handler_onion_message_handler_arg.ptr), InternalUtils.check_arr_len(our_node_secret, 32), current_time, InternalUtils.check_arr_len(ephemeral_random_data, 32), logger == null ? 0 : logger.ptr, custom_message_handler == null ? 0 : custom_message_handler.ptr);
                Reference.reachabilityFence(message_handler_chan_handler_arg);
                Reference.reachabilityFence(message_handler_route_handler_arg);
index 704d6c167e6d8cdfd84e41ce5ff927fa98db4fa4..b6c56ab9ff718559b6a73a05a0ee1c60a772af33 100644 (file)
@@ -13,20 +13,21 @@ import javax.annotation.Nullable;
  * 
  * Each method can return three possible values:
  * If persistence (including any relevant `fsync()` calls) happens immediately, the
- * implementation should return `Ok(())`, indicating normal channel operation should continue.
+ * implementation should return [`ChannelMonitorUpdateStatus::Completed`], indicating normal
+ * channel operation should continue.
  * If persistence happens asynchronously, implementations should first ensure the
  * [`ChannelMonitor`] or [`ChannelMonitorUpdate`] are written durably to disk, and then return
- * `Err(ChannelMonitorUpdateErr::TemporaryFailure)` while the update continues in the
- * background. Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be
- * called with the corresponding [`MonitorUpdateId`].
+ * [`ChannelMonitorUpdateStatus::InProgress`] while the update continues in the background.
+ * Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be called with
+ * the corresponding [`MonitorUpdateId`].
  * 
  * Note that unlike the direct [`chain::Watch`] interface,
  * [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
  * 
  * If persistence fails for some reason, implementations should return
- * `Err(ChannelMonitorUpdateErr::PermanentFailure)`, in which case the channel will likely be
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`], in which case the channel will likely be
  * closed without broadcasting the latest state. See
- * [`ChannelMonitorUpdateErr::PermanentFailure`] for more details.
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`] for more details.
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Persist extends CommonBase {
@@ -52,15 +53,15 @@ public class Persist extends CommonBase {
                 * and the stored channel data). Note that you **must** persist every new monitor to disk.
                 * 
                 * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-                * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+                * if you return [`ChannelMonitorUpdateStatus::InProgress`].
                 * 
                 * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
-                * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+                * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
                 * 
                 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
                 * [`Writeable::write`]: crate::util::ser::Writeable::write
                 */
-               Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id);
+               ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id);
                /**
                 * Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
                 * update.
@@ -88,44 +89,42 @@ public class Persist extends CommonBase {
                 * whereas updates are small and `O(1)`.
                 * 
                 * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-                * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+                * if you return [`ChannelMonitorUpdateStatus::InProgress`].
                 * 
                 * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
                 * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
-                * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+                * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
                 * 
                 * [`Writeable::write`]: crate::util::ser::Writeable::write
                 * 
                 * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
                 */
-               Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
+               ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
        }
        private static class LDKPersistHolder { Persist held; }
        public static Persist new_impl(PersistInterface arg) {
                final LDKPersistHolder impl_holder = new LDKPersistHolder();
                impl_holder.held = new Persist(new bindings.LDKPersist() {
-                       @Override public long persist_new_channel(long channel_id, long data, long update_id) {
+                       @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id) {
                                org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
                                if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
                                org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
                                if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
-                               Result_NoneChannelMonitorUpdateErrZ ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
-                               return result;
+                               return ret;
                        }
-                       @Override public long update_persisted_channel(long channel_id, long update, long data, long update_id) {
+                       @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id) {
                                org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
                                if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); }
                                org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
                                org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
                                if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
-                               Result_NoneChannelMonitorUpdateErrZ ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
-                               return result;
+                               return ret;
                        }
                });
                return impl_holder.held;
@@ -139,26 +138,24 @@ public class Persist extends CommonBase {
         * and the stored channel data). Note that you **must** persist every new monitor to disk.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
-        * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         */
-       public Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id) {
-               long ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+       public ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id) {
+               ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(data);
                Reference.reachabilityFence(update_id);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(channel_id); };
                if (this != null) { this.ptrs_to.add(data); };
                if (this != null) { this.ptrs_to.add(update_id); };
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
@@ -188,30 +185,28 @@ public class Persist extends CommonBase {
         * whereas updates are small and `O(1)`.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
         * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
-        * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         * 
         * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint channel_id, @Nullable ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) {
-               long ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+       public ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, @Nullable ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) {
+               ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(update);
                Reference.reachabilityFence(data);
                Reference.reachabilityFence(update_id);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(channel_id); };
                if (this != null) { this.ptrs_to.add(update); };
                if (this != null) { this.ptrs_to.add(data); };
                if (this != null) { this.ptrs_to.add(update_id); };
-               return ret_hu_conv;
+               return ret;
        }
 
 }
index 5c7026be8afa5a4f7d79f6125d84a881e85e66c8..fc20cc32ee5a3f41eb966bfce6773b10e54ca7c4 100644 (file)
@@ -89,6 +89,23 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Pings contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Ping b) {
+               boolean ret = bindings.Ping_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Ping)) return false;
+               return this.eq((Ping)o);
+       }
        /**
         * Serialize the Ping object into a byte array which can be read by Ping_read
         */
index de159f2ba307dbf8c30173cc4d3a6242d702a57f..5b7823f6191f5a9fa9c592141b4d6fc26e7a59cc 100644 (file)
@@ -70,6 +70,23 @@ public class Pong extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Pongs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Pong b) {
+               boolean ret = bindings.Pong_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Pong)) return false;
+               return this.eq((Pong)o);
+       }
        /**
         * Serialize the Pong object into a byte array which can be read by Pong_read
         */
index 03b0cbd1a08ed8865ecec8d2e3fd59c543b2e0bb..7e1f32be2a45ef43377d61c27a5c67d963b393a9 100644 (file)
@@ -89,6 +89,8 @@ public class PositiveTimestamp extends CommonBase {
         * Creates a `PositiveTimestamp` from a [`SystemTime`] with a corresponding Unix timestamp in
         * the range `0..=MAX_TIMESTAMP`.
         * 
+        * Note that the subsecond part is dropped as it is not representable in BOLT 11 invoices.
+        * 
         * Otherwise, returns a [`CreationError::TimestampOutOfBounds`].
         */
        public static Result_PositiveTimestampCreationErrorZ from_system_time(long time) {
@@ -103,6 +105,8 @@ public class PositiveTimestamp extends CommonBase {
         * Creates a `PositiveTimestamp` from a [`Duration`] since the Unix epoch in the range
         * `0..=MAX_TIMESTAMP`.
         * 
+        * Note that the subsecond part is dropped as it is not representable in BOLT 11 invoices.
+        * 
         * Otherwise, returns a [`CreationError::TimestampOutOfBounds`].
         */
        public static Result_PositiveTimestampCreationErrorZ from_duration_since_epoch(long duration) {
index edb52e220ce7d6ad4cf6bb1649d483357e531915..71658b3f3f14e3c00957d7710f6b58c717a9ceb7 100644 (file)
@@ -11,19 +11,28 @@ import javax.annotation.Nullable;
 /**
  * [`Score`] implementation using channel success probability distributions.
  * 
- * Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
- * and Stefan Richter [[1]]. Given the uncertainty of channel liquidity balances, probability
- * distributions are defined based on knowledge learned from successful and unsuccessful attempts.
- * Then the negative `log10` of the success probability is used to determine the cost of routing a
- * specific HTLC amount through a channel.
+ * Channels are tracked with upper and lower liquidity bounds - when an HTLC fails at a channel,
+ * we learn that the upper-bound on the available liquidity is lower than the amount of the HTLC.
+ * When a payment is forwarded through a channel (but fails later in the route), we learn the
+ * lower-bound on the channel's available liquidity must be at least the value of the HTLC.
  * 
- * Knowledge about channel liquidity balances takes the form of upper and lower bounds on the
- * possible liquidity. Certainty of the bounds is decreased over time using a decay function. See
- * [`ProbabilisticScoringParameters`] for details.
+ * These bounds are then used to determine a success probability using the formula from
+ * Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
+ * and Stefan Richter [[1]] (i.e. `(upper_bound - payment_amount) / (upper_bound - lower_bound)`).
  * 
- * Since the scorer aims to learn the current channel liquidity balances, it works best for nodes
- * with high payment volume or that actively probe the [`NetworkGraph`]. Nodes with low payment
- * volume are more likely to experience failed payment paths, which would need to be retried.
+ * This probability is combined with the [`liquidity_penalty_multiplier_msat`] and
+ * [`liquidity_penalty_amount_multiplier_msat`] parameters to calculate a concrete penalty in
+ * milli-satoshis. The penalties, when added across all hops, have the property of being linear in
+ * terms of the entire path's success probability. This allows the router to directly compare
+ * penalties for different paths. See the documentation of those parameters for the exact formulas.
+ * 
+ * The liquidity bounds are decayed by halving them every [`liquidity_offset_half_life`].
+ * 
+ * Further, we track the history of our upper and lower liquidity bounds for each channel,
+ * allowing us to assign a second penalty (using [`historical_liquidity_penalty_multiplier_msat`]
+ * and [`historical_liquidity_penalty_amount_multiplier_msat`]) based on the same probability
+ * formula, but using the history of a channel rather than our latest estimates for the liquidity
+ * bounds.
  * 
  * # Note
  * 
@@ -31,6 +40,11 @@ import javax.annotation.Nullable;
  * behavior.
  * 
  * [1]: https://arxiv.org/abs/2107.05322
+ * [`liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_amount_multiplier_msat
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringParameters::liquidity_offset_half_life
+ * [`historical_liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_multiplier_msat
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_amount_multiplier_msat
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class ProbabilisticScorer extends CommonBase {
index 3617ce0d6f63406d14e1a6ce25f693c9c3562051..30694c53537d3a937665f1eb0c7c1d785b4231e2 100644 (file)
@@ -90,7 +90,8 @@ public class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with the negative `log10` of the channel's success
-        * probability for a payment to determine the liquidity penalty.
+        * probability for a payment, as determined by our latest estimates of the channel's
+        * liquidity, to determine the liquidity penalty.
         * 
         * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
         * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
@@ -99,7 +100,9 @@ public class ProbabilisticScoringParameters extends CommonBase {
         * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
         * result in a `u64::max_value` penalty, however.
         * 
-        * Default value: 40,000 msat
+        * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+        * 
+        * Default value: 30,000 msat
         * 
         * [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
         */
@@ -111,7 +114,8 @@ public class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with the negative `log10` of the channel's success
-        * probability for a payment to determine the liquidity penalty.
+        * probability for a payment, as determined by our latest estimates of the channel's
+        * liquidity, to determine the liquidity penalty.
         * 
         * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
         * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
@@ -120,7 +124,9 @@ public class ProbabilisticScoringParameters extends CommonBase {
         * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
         * result in a `u64::max_value` penalty, however.
         * 
-        * Default value: 40,000 msat
+        * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+        * 
+        * Default value: 30,000 msat
         * 
         * [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
         */
@@ -131,14 +137,20 @@ public class ProbabilisticScoringParameters extends CommonBase {
        }
 
        /**
-        * The time required to elapse before any knowledge learned about channel liquidity balances is
-        * cut in half.
+        * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+        * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+        * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+        * capacity.
         * 
-        * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
-        * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
-        * the certainty of the channel liquidity balance.
+        * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+        * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+        * struct documentation for more info on the way the liquidity bounds are used.
         * 
-        * Default value: 1 hour
+        * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+        * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+        * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+        * 
+        * Default value: 6 hours
         * 
         * # Note
         * 
@@ -152,14 +164,20 @@ public class ProbabilisticScoringParameters extends CommonBase {
        }
 
        /**
-        * The time required to elapse before any knowledge learned about channel liquidity balances is
-        * cut in half.
+        * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+        * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+        * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+        * capacity.
+        * 
+        * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+        * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+        * struct documentation for more info on the way the liquidity bounds are used.
         * 
-        * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
-        * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
-        * the certainty of the channel liquidity balance.
+        * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+        * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+        * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
         * 
-        * Default value: 1 hour
+        * Default value: 6 hours
         * 
         * # Note
         * 
@@ -174,7 +192,8 @@ public class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with a payment amount and the negative `log10` of the
-        * channel's success probability for the payment to determine the amount penalty.
+        * channel's success probability for the payment, as determined by our latest estimates of the
+        * channel's liquidity, to determine the amount penalty.
         * 
         * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
         * fees plus penalty) for large payments. The penalty is computed as the product of this
@@ -189,7 +208,7 @@ public class ProbabilisticScoringParameters extends CommonBase {
         * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
         * fall below `1`.
         * 
-        * Default value: 256 msat
+        * Default value: 192 msat
         */
        public long get_liquidity_penalty_amount_multiplier_msat() {
                long ret = bindings.ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this.ptr);
@@ -199,7 +218,8 @@ public class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with a payment amount and the negative `log10` of the
-        * channel's success probability for the payment to determine the amount penalty.
+        * channel's success probability for the payment, as determined by our latest estimates of the
+        * channel's liquidity, to determine the amount penalty.
         * 
         * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
         * fees plus penalty) for large payments. The penalty is computed as the product of this
@@ -214,7 +234,7 @@ public class ProbabilisticScoringParameters extends CommonBase {
         * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
         * fall below `1`.
         * 
-        * Default value: 256 msat
+        * Default value: 192 msat
         */
        public void set_liquidity_penalty_amount_multiplier_msat(long val) {
                bindings.ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
@@ -222,6 +242,134 @@ public class ProbabilisticScoringParameters extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * A multiplier used in conjunction with the negative `log10` of the channel's success
+        * probability for the payment, as determined based on the history of our estimates of the
+        * channel's available liquidity, to determine a penalty.
+        * 
+        * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+        * only our latest estimate for the current liquidity available in the channel, it estimates
+        * success probability based on the estimated liquidity available in the channel through
+        * history. Specifically, every time we update our liquidity bounds on a given channel, we
+        * track which of several buckets those bounds fall into, exponentially decaying the
+        * probability of each bucket as new samples are added.
+        * 
+        * Default value: 10,000 msat
+        * 
+        * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+        */
+       public long get_historical_liquidity_penalty_multiplier_msat() {
+               long ret = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A multiplier used in conjunction with the negative `log10` of the channel's success
+        * probability for the payment, as determined based on the history of our estimates of the
+        * channel's available liquidity, to determine a penalty.
+        * 
+        * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+        * only our latest estimate for the current liquidity available in the channel, it estimates
+        * success probability based on the estimated liquidity available in the channel through
+        * history. Specifically, every time we update our liquidity bounds on a given channel, we
+        * track which of several buckets those bounds fall into, exponentially decaying the
+        * probability of each bucket as new samples are added.
+        * 
+        * Default value: 10,000 msat
+        * 
+        * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+        */
+       public void set_historical_liquidity_penalty_multiplier_msat(long val) {
+               bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+        * channel's success probability for the payment, as determined based on the history of our
+        * estimates of the channel's available liquidity, to determine a penalty.
+        * 
+        * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+        * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+        * of the payment amount, weighted by the negative `log10` of the success probability.
+        * 
+        * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+        * of using only our latest estimate for the current liquidity available in the channel, it
+        * estimates success probability based on the estimated liquidity available in the channel
+        * through history. Specifically, every time we update our liquidity bounds on a given
+        * channel, we track which of several buckets those bounds fall into, exponentially decaying
+        * the probability of each bucket as new samples are added.
+        * 
+        * Default value: 64 msat
+        * 
+        * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+        */
+       public long get_historical_liquidity_penalty_amount_multiplier_msat() {
+               long ret = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+        * channel's success probability for the payment, as determined based on the history of our
+        * estimates of the channel's available liquidity, to determine a penalty.
+        * 
+        * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+        * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+        * of the payment amount, weighted by the negative `log10` of the success probability.
+        * 
+        * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+        * of using only our latest estimate for the current liquidity available in the channel, it
+        * estimates success probability based on the estimated liquidity available in the channel
+        * through history. Specifically, every time we update our liquidity bounds on a given
+        * channel, we track which of several buckets those bounds fall into, exponentially decaying
+        * the probability of each bucket as new samples are added.
+        * 
+        * Default value: 64 msat
+        * 
+        * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+        */
+       public void set_historical_liquidity_penalty_amount_multiplier_msat(long val) {
+               bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+        * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+        * seen a liquidity estimate update for this amount of time, the historical datapoints are
+        * decayed by half.
+        * 
+        * Note that after 16 or more half lives all historical data will be completely gone.
+        * 
+        * Default value: 14 days
+        */
+       public long get_historical_no_updates_half_life() {
+               long ret = bindings.ProbabilisticScoringParameters_get_historical_no_updates_half_life(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+        * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+        * seen a liquidity estimate update for this amount of time, the historical datapoints are
+        * decayed by half.
+        * 
+        * Note that after 16 or more half lives all historical data will be completely gone.
+        * 
+        * Default value: 14 days
+        */
+       public void set_historical_no_updates_half_life(long val) {
+               bindings.ProbabilisticScoringParameters_set_historical_no_updates_half_life(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
        /**
         * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
         * channel's capacity, which makes us prefer nodes with a smaller `htlc_maximum_msat`. We
index 4a9705e915cfc9bcd3386aa57b4bf80e53424eb8..238aa7fd40c32689f5136ec0b106c63166751fc7 100644 (file)
@@ -109,6 +109,23 @@ public class QueryChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two QueryChannelRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(QueryChannelRange b) {
+               boolean ret = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof QueryChannelRange)) return false;
+               return this.eq((QueryChannelRange)o);
+       }
        /**
         * \n\t * Calculates the overflow safe ending block height for the query.\n\t * Overflow returns `0xffffffff`, otherwise returns `first_blocknum + number_of_blocks`\n\t
         */
index 71f869a35966975d9f5ad46361d14a52cf3a49f0..ce9124311661118581aa51a9e8f08a7e3583e97c 100644 (file)
@@ -96,6 +96,23 @@ public class QueryShortChannelIds extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two QueryShortChannelIdss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(QueryShortChannelIds b) {
+               boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof QueryShortChannelIds)) return false;
+               return this.eq((QueryShortChannelIds)o);
+       }
        /**
         * Read a QueryShortChannelIds from a byte array, created by QueryShortChannelIds_write
         */
index bdbaa8d0cbb748f9f959d4e8271264f749008e26..cb5d67015780d8553a9ddea9321b507df2043104 100644 (file)
@@ -9,7 +9,8 @@ import javax.annotation.Nullable;
 
 
 /**
- * Rapid Gossip Sync struct
+ * The main Rapid Gossip Sync object.
+ * 
  * See [crate-level documentation] for usage.
  * 
  * [crate-level documentation]: crate
@@ -24,7 +25,7 @@ public class RapidGossipSync extends CommonBase {
        }
 
        /**
-        * Instantiate a new [`RapidGossipSync`] instance
+        * Instantiate a new [`RapidGossipSync`] instance.
         */
        public static RapidGossipSync of(NetworkGraph network_graph) {
                long ret = bindings.RapidGossipSync_new(network_graph == null ? 0 : network_graph.ptr);
@@ -37,24 +38,24 @@ public class RapidGossipSync extends CommonBase {
        }
 
        /**
-        * Sync gossip data from a file
+        * Update network graph from binary data.
         * Returns the last sync timestamp to be used the next time rapid sync data is queried.
         * 
-        * `network_graph`: The network graph to apply the updates to
+        * `network_graph`: network graph to be updated
         * 
-        * `sync_path`: Path to the file where the gossip update data is located
+        * `update_data`: `&[u8]` binary stream that comprises the update data
         */
-       public Result_u32GraphSyncErrorZ sync_network_graph_with_file_path(java.lang.String sync_path) {
-               long ret = bindings.RapidGossipSync_sync_network_graph_with_file_path(this.ptr, sync_path);
+       public Result_u32GraphSyncErrorZ update_network_graph(byte[] update_data) {
+               long ret = bindings.RapidGossipSync_update_network_graph(this.ptr, update_data);
                Reference.reachabilityFence(this);
-               Reference.reachabilityFence(sync_path);
+               Reference.reachabilityFence(update_data);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_u32GraphSyncErrorZ ret_hu_conv = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
        /**
-        * Returns whether a rapid gossip sync has completed at least once
+        * Returns whether a rapid gossip sync has completed at least once.
         */
        public boolean is_initial_sync_complete() {
                boolean ret = bindings.RapidGossipSync_is_initial_sync_complete(this.ptr);
@@ -62,21 +63,4 @@ public class RapidGossipSync extends CommonBase {
                return ret;
        }
 
-       /**
-        * Update network graph from binary data.
-        * Returns the last sync timestamp to be used the next time rapid sync data is queried.
-        * 
-        * `network_graph`: network graph to be updated
-        * 
-        * `update_data`: `&[u8]` binary stream that comprises the update data
-        */
-       public Result_u32GraphSyncErrorZ update_network_graph(byte[] update_data) {
-               long ret = bindings.RapidGossipSync_update_network_graph(this.ptr, update_data);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(update_data);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_u32GraphSyncErrorZ ret_hu_conv = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
 }
index 6a80ecf15dd4d46f0d8046f2051a8e1c6267e65a..bb3e9aac9f5f3fb3a8ed9826746b6414ec6cf4a5 100644 (file)
@@ -152,6 +152,23 @@ public class ReplyChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ReplyChannelRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ReplyChannelRange b) {
+               boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ReplyChannelRange)) return false;
+               return this.eq((ReplyChannelRange)o);
+       }
        /**
         * Read a ReplyChannelRange from a byte array, created by ReplyChannelRange_write
         */
index 6c972fcfcd07cc14d6baa1b2c3d609ad6cd10d57..f18e5e44b711e1a1e712cc5b8b674b7df82495d1 100644 (file)
@@ -92,6 +92,23 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ReplyShortChannelIdsEnds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ReplyShortChannelIdsEnd b) {
+               boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ReplyShortChannelIdsEnd)) return false;
+               return this.eq((ReplyShortChannelIdsEnd)o);
+       }
        /**
         * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
         */
index 33fb739f8fb70eae9cfc794e219f3321fc24a9e1..b03e60d1d83f22aa86b1855fe29b71ba1cc5cac2 100644 (file)
@@ -36,7 +36,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                private Result_AcceptChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_AcceptChannelDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
         */
        public static Result_AcceptChannelDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 1288c00da0eb1fca1cd988b20567d94959085a4c..a7af392098acbdf769f99ad478a2e98783217267 100644 (file)
@@ -36,7 +36,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                private Result_AnnouncementSignaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
         */
        public static Result_AnnouncementSignaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index c8991f4295b00e680b64a0d886fe06417f53e3b6..885d8d56e994145878efd556a9bbf178eb3feff8 100644 (file)
@@ -36,7 +36,7 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase {
                private Result_BlindedHopDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_BlindedHopDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -66,11 +66,10 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedHopDecodeErrorZ in the error state.
         */
        public static Result_BlindedHopDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_BlindedHopDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_BlindedHopDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index bfa512b095272fe66e81c2f3d16d7efa3e170508..7f33ada1cd28aeb05fc1ecc1fbd8fbc2928dbf46 100644 (file)
@@ -36,7 +36,7 @@ public class Result_BlindedRouteDecodeErrorZ extends CommonBase {
                private Result_BlindedRouteDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_BlindedRouteDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -66,11 +66,10 @@ public class Result_BlindedRouteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedRouteDecodeErrorZ in the error state.
         */
        public static Result_BlindedRouteDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_BlindedRouteDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_BlindedRouteDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedRouteDecodeErrorZ ret_hu_conv = Result_BlindedRouteDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index cf329bc1d94fd3263ff7eaa6d12e3fbf1062e731..3f611c7464639a8e4b3cc03e2ced7d1c7b5da623 100644 (file)
@@ -36,7 +36,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                private Result_BuiltCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the error state.
         */
        public static Result_BuiltCommitmentTransactionDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index e58e4dd22d906c2e8367fb78deff7de963359b2e..ebd086db78a43f983b371c7b5506014439fdbf4d 100644 (file)
@@ -36,7 +36,7 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                private Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
         * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
         */
        public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 4df695ad8b0ff617b138dfd0434bb28d868ccb68..24b90576cae449a93843b6bd2d6675f74d02456a 100644 (file)
@@ -36,7 +36,7 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                private Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
         * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
         */
        public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 0c9f5ee8a025f598a674880481583415ef7a56a4..9567e9a0e50acdd622ce9aaa8cc49c4f4e23e3f2 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
                private Result_COption_ClosureReasonZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_ClosureReasonZDecodeErrorZ in the error state.
         */
        public static Result_COption_ClosureReasonZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_ClosureReasonZDecodeErrorZ ret_hu_conv = Result_COption_ClosureReasonZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..ddcaeac
--- /dev/null
@@ -0,0 +1,94 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_COption_CustomOnionMessageContentsZDecodeErrorZ extends CommonBase {
+       private Result_COption_CustomOnionMessageContentsZDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_COption_CustomOnionMessageContentsZDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               public final Option_CustomOnionMessageContentsZ res;
+               private Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.Option_CustomOnionMessageContentsZ res_hu_conv = org.ldk.structs.Option_CustomOnionMessageContentsZ.constr_from_ptr(res);
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               public final DecodeError err;
+               private Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the success state.
+        */
+       public static Result_COption_CustomOnionMessageContentsZDecodeErrorZ ok(Option_CustomOnionMessageContentsZ o) {
+               long ret = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_CustomOnionMessageContentsZDecodeErrorZ ret_hu_conv = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the error state.
+        */
+       public static Result_COption_CustomOnionMessageContentsZDecodeErrorZ err(DecodeError e) {
+               long ret = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_CustomOnionMessageContentsZDecodeErrorZ ret_hu_conv = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_COption_CustomOnionMessageContentsZDecodeErrorZ clone() {
+               long ret = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_COption_CustomOnionMessageContentsZDecodeErrorZ ret_hu_conv = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 39499efdef184a86dfe05975b07cb3f90526bab8..ad1ee9b35d259b4eea196f0069183865cd7d53da 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_EventZDecodeErrorZ extends CommonBase {
                private Result_COption_EventZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_EventZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_EventZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_EventZDecodeErrorZ in the error state.
         */
        public static Result_COption_EventZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_EventZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_EventZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_EventZDecodeErrorZ ret_hu_conv = Result_COption_EventZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 3c149d0733c74d3948eacd0887cfb11d3f45b280..74a2aea52cdd89e25db5290febf1fa77c706f7ce 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
                private Result_COption_HTLCDestinationZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ in the error state.
         */
        public static Result_COption_HTLCDestinationZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_HTLCDestinationZDecodeErrorZ ret_hu_conv = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 0a10bc93a81ff03f9894d39847e70aa6db6e5f02..a20c5aba8c14308b9c6515e5a4a6dd2a84a9ae79 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
                private Result_COption_MonitorEventZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_MonitorEventZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the error state.
         */
        public static Result_COption_MonitorEventZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_MonitorEventZDecodeErrorZ ret_hu_conv = Result_COption_MonitorEventZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6184523c685730f387edad7bedfddd12effcd527..71552e25732d7b42231caf831cf02d46ac9ce6dc 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
                private Result_COption_NetworkUpdateZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_NetworkUpdateZDecodeErrorZ in the error state.
         */
        public static Result_COption_NetworkUpdateZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_NetworkUpdateZDecodeErrorZ ret_hu_conv = Result_COption_NetworkUpdateZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6d2e9a09c32373e610f69727fa112153357c07b5..7514dfbf5e83c131d9533e8dbb08ece72c6f7cab 100644 (file)
@@ -36,7 +36,7 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase {
                private Result_COption_TypeZDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_COption_TypeZDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_TypeZDecodeErrorZ in the error state.
         */
        public static Result_COption_TypeZDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_COption_TypeZDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 5cef97db28314fdab2de7eef7e8f51aca9eaa072..08a4f77b057baf5b9cf51c08ffaa906c8fda0153 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                private Result_ChannelAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelAnnouncementDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
         */
        public static Result_ChannelAnnouncementDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index c850ef2f45fd767abee9388b583c6435f3f5916e..9bbb221c16f69e38fb903ee0f2e4dddc27fdb1a4 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                private Result_ChannelConfigDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelConfigDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
         */
        public static Result_ChannelConfigDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 208f9274e6070a0908f151102889a9687906fbe4..e91c46250dfd871868cc245579484b507e8b7fbe 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
                private Result_ChannelCounterpartyDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelCounterpartyDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the error state.
         */
        public static Result_ChannelCounterpartyDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelCounterpartyDecodeErrorZ ret_hu_conv = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index c93f5bf7d9ce925dfa168551ff6bbc6e3454f71d..6d81560dca5d60dad5e5edbecd5143659bfcd170 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
                private Result_ChannelDetailsDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelDetailsDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelDetailsDecodeErrorZ in the error state.
         */
        public static Result_ChannelDetailsDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 498c09c481e18d03b993994652126190af1c4ab3..7271abf481302a237bfa993b6681d425c9000ebe 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                private Result_ChannelFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelFeaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state.
         */
        public static Result_ChannelFeaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 8c7b1a22592628e5fe0447a112d58f988e4bff2b..1273c74c1248b0de13d14493ad57f11a1391fd86 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                private Result_ChannelInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelInfoDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state.
         */
        public static Result_ChannelInfoDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index a2e8a7de97222a9f171a1ffc6dc0fa29e00e242d..e45f178e116245803fafa1a3651b9bb614cec816 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                private Result_ChannelMonitorUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
         */
        public static Result_ChannelMonitorUpdateDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 58c134136e0ffa2352acf75117313b164dd0b6cd..17bb92eb7400e42d431ae222321af44a6ebb7e4f 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                private Result_ChannelPublicKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelPublicKeysDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the error state.
         */
        public static Result_ChannelPublicKeysDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6a503b8be088332b68ece47afe48ee4d93badd65..d689e6a86bcfc16d8b84f234918b40e95fdc2925 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase {
                private Result_ChannelReadyDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelReadyDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReadyDecodeErrorZ in the error state.
         */
        public static Result_ChannelReadyDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelReadyDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelReadyDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelReadyDecodeErrorZ ret_hu_conv = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 66227114ef5eb18ce5f550f8af0810adcca3407e..4b2a0cf4deb98ff874de7ce9dd38d0ea4b8df608 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                private Result_ChannelReestablishDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelReestablishDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
         */
        public static Result_ChannelReestablishDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index d8e0aef426a80ce4d1cd442a0563c840ae14d901..ef325e457940531a1d822818806647345632e2c3 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                private Result_ChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
         * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state.
         */
        public static Result_ChannelTransactionParametersDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 544c3d061c7c62884787d3d4745355019810176a..ea96cd984b1e476eb139c985cdc2443ebcd9aa21 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
                private Result_ChannelTypeFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the error state.
         */
        public static Result_ChannelTypeFeaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelTypeFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 85036f356238e4488c4100b6c90664d68280c62a..187b38236eff728191372bbef0e08c08f74ae545 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                private Result_ChannelUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelUpdateDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
         */
        public static Result_ChannelUpdateDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index b6add11911035c1bc358733146827857b0f1f13d..86516cd56d2cd43cc05f0c9f8e076feef76747d0 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
                private Result_ChannelUpdateInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the error state.
         */
        public static Result_ChannelUpdateInfoDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelUpdateInfoDecodeErrorZ ret_hu_conv = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 729c84f76f4c66c50e3aeb2ee0b0637ee3e680da..50b60ff336353941d126802974201fefc25ad44a 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                private Result_ClosingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ClosingSignedDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
         */
        public static Result_ClosingSignedDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index ad9ebaf4b3830a092599537ebd209535945f215d..784acc1515d47a03c7f9718a7941e62ba4a231de 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
                private Result_ClosingSignedFeeRangeDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the error state.
         */
        public static Result_ClosingSignedFeeRangeDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index da33fb504c1124b7036a0672c5103fcd494be975..28a2da4780807c18be4da6a11b6245569416fbbd 100644 (file)
@@ -36,7 +36,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                private Result_CommitmentSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_CommitmentSignedDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
         */
        public static Result_CommitmentSignedDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index a09a9c96307868049e1c8f58325725afa93b289f..9c872797d13471c55e972cce08249482cb03af6e 100644 (file)
@@ -36,7 +36,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                private Result_CommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_CommitmentTransactionDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the error state.
         */
        public static Result_CommitmentTransactionDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6aea5a8c9239f693fb195b94824442b98283a8cb..68f1fef5d29d921586d3d43430bef94c3e75647c 100644 (file)
@@ -36,7 +36,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                private Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
         * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the error state.
         */
        public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index f16a7e4067c29bc7b7a6c841fb96dac6745d8491..bc11535195f7972c93d78fe913ea16e26303d4fd 100644 (file)
@@ -36,7 +36,7 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase
                private Result_CounterpartyCommitmentSecretsDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase
         * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the error state.
         */
        public static Result_CounterpartyCommitmentSecretsDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyCommitmentSecretsDecodeErrorZ ret_hu_conv = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 2210c6ffd3f584fa23d4f6c0d154ee606cae71f3..f6054131a74ca6c9a48b92a7a719c8056b50b557 100644 (file)
@@ -36,7 +36,7 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
                private Result_CounterpartyForwardingInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the error state.
         */
        public static Result_CounterpartyForwardingInfoDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyForwardingInfoDecodeErrorZ ret_hu_conv = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 90b22aaed0e49d8c19c02db581bdcb1692b43108..b90d69aaec81fadc314eee71e6ec15a69a93c870 100644 (file)
@@ -36,7 +36,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
                private Result_DelayedPaymentOutputDescriptorDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
         * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state.
         */
        public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 5a84354d62e49fe0f2774caf0e855f2a6df9c158..12199032903b6ae9bd0f53262d66d9c06dfa3a03 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                private Result_ErrorMessageDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ErrorMessageDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
         */
        public static Result_ErrorMessageDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 15b16b7731d49fee621ce7302f04e6451ade5114..d01454b9ee0d9144167679eb653f56252ba8ecd7 100644 (file)
@@ -36,7 +36,7 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
                private Result_FixedPenaltyScorerDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the error state.
         */
        public static Result_FixedPenaltyScorerDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FixedPenaltyScorerDecodeErrorZ ret_hu_conv = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index dcf357c28e65b251c6e0257081074fb83c42532a..0fd8f15e892ed208c2738f33ebd092f00e7e85ad 100644 (file)
@@ -36,7 +36,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                private Result_FundingCreatedDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_FundingCreatedDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
         */
        public static Result_FundingCreatedDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 2e05c5b192a5a2c59d55f025a5bde176b5ec43dd..6a7d8dde047e04ac6144314c9cfffc95624941f4 100644 (file)
@@ -36,7 +36,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                private Result_FundingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_FundingSignedDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
         */
        public static Result_FundingSignedDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index dc57e025a15b66c41b3ba41e91e9523d1190b8a0..d4762ba240a253a36016f624c47f4462c0ef1932 100644 (file)
@@ -36,7 +36,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                private Result_GossipTimestampFilterDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_GossipTimestampFilterDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
         * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
         */
        public static Result_GossipTimestampFilterDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 3882caaa778dc0ba9abde24ccc78ffaf492400bd..6c19609380bda253bce79a829d7bdf2dbfa3e6fe 100644 (file)
@@ -36,7 +36,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                private Result_HTLCOutputInCommitmentDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the error state.
         */
        public static Result_HTLCOutputInCommitmentDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index a65a9891c136e3500ac9ff54e4f728d7a182ae47..e9ac62893e0913ebb13050b7598ee18035dbc0c2 100644 (file)
@@ -36,7 +36,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                private Result_HTLCUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_HTLCUpdateDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
         */
        public static Result_HTLCUpdateDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6feae212d70dcc360450c3b3b12b1fb97ce7bccf..f54a5686f513b1d8a9cc8b0b7a8c676079ab1389 100644 (file)
@@ -36,7 +36,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                private Result_HolderCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the error state.
         */
        public static Result_HolderCommitmentTransactionDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 12f95bdf8efae7bed56bbaf5afea4279580f31b0..244f783f53d1d9a73e7ee28ca378acda8c63d849 100644 (file)
@@ -36,7 +36,7 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
                private Result_InFlightHtlcsDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_InFlightHtlcsDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -66,11 +66,10 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the error state.
         */
        public static Result_InFlightHtlcsDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InFlightHtlcsDecodeErrorZ ret_hu_conv = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 8478db87819f856b97f8f4c2876baf9f0684005e..407625e7abc8194523769dadefe58f162e698eb9 100644 (file)
@@ -36,7 +36,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                private Result_InMemorySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_InMemorySignerDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
         */
        public static Result_InMemorySignerDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 1891b2b46be11a0b214637b2b8dea16d74c753a3..d698f7496422430693c4245d6d76cef19eee45af 100644 (file)
@@ -36,7 +36,7 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                private Result_InitDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_InitDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_InitDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitDecodeErrorZ in the error state.
         */
        public static Result_InitDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_InitDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index b16350e6ac66e82e8f3ec8552fb790b9c51bf4bd..70a289903dab179a1180bf613b3a390fb50219b3 100644 (file)
@@ -36,7 +36,7 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                private Result_InitFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_InitFeaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state.
         */
        public static Result_InitFeaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 64b035bcaeae20be58f30da667880e042a6becc6..ff5da7581df8237beae7e1cbe8ccbdee2a97b026 100644 (file)
@@ -36,7 +36,7 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
                private Result_InvoiceFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_InvoiceFeaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state.
         */
        public static Result_InvoiceFeaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index ba73d47fbe265e8155d4f858be0b4a40f34364bf..0fb1183ab4062dc4bf7b56b251d4e73244bd4e7a 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase {
                private Result_NetAddressDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NetAddressDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NetAddressDecodeErrorZ in the error state.
         */
        public static Result_NetAddressDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NetAddressDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 046b2c82e4663d465024e55364a28945b93d4bf7..4ef6bca776c4d61c2d20dfecc32a9783ae2fc78b 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                private Result_NetworkGraphDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NetworkGraphDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -60,11 +60,10 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state.
         */
        public static Result_NetworkGraphDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 3c30329991b150f142ceb37249e787f631e12e6a..27a82aefa8cb1f3984095ff36d0392dcea0b7903 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase {
                private Result_NodeAliasDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeAliasDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAliasDecodeErrorZ in the error state.
         */
        public static Result_NodeAliasDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeAliasDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeAliasDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 0f8639d3e3a4f37a50fa88e2d9487add2c7af8c4..99bb36af30adb4625e6751122868eb0e87b7fbee 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                private Result_NodeAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeAnnouncementDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
         */
        public static Result_NodeAnnouncementDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index aeb11279a96782db12b7f1268e618375700f9a93..98f054d1e1711cfcb16e37ef89eed0b9af1e87b8 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                private Result_NodeAnnouncementInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state.
         */
        public static Result_NodeAnnouncementInfoDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index ff12b0d89f5dafb107bc36ca630eaaef07c008aa..80c373fb004be273732e4f5847c3ef65677391db 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                private Result_NodeFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeFeaturesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state.
         */
        public static Result_NodeFeaturesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 75a5ec341c35dd53dea832f67b60650cd03c6e3e..91ef8d69a4a1b9ab0e22c756420793fb1cc113bd 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase {
                private Result_NodeIdDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeIdDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeIdDecodeErrorZ in the error state.
         */
        public static Result_NodeIdDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeIdDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeIdDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 829181a2cc64a05dde0f2e9eeea3829044c8b0cc..e90fc2fc2dd3a304054e888964084e47a893025c 100644 (file)
@@ -36,7 +36,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                private Result_NodeInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_NodeInfoDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeInfoDecodeErrorZ in the error state.
         */
        public static Result_NodeInfoDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java b/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java
deleted file mode 100644 (file)
index 05cf131..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
-       private Result_NoneChannelMonitorUpdateErrZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_NoneChannelMonitorUpdateErrZ_free(ptr); } super.finalize();
-       }
-
-       static Result_NoneChannelMonitorUpdateErrZ constr_from_ptr(long ptr) {
-               if (bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(ptr)) {
-                       return new Result_NoneChannelMonitorUpdateErrZ_OK(null, ptr);
-               } else {
-                       return new Result_NoneChannelMonitorUpdateErrZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_NoneChannelMonitorUpdateErrZ_OK extends Result_NoneChannelMonitorUpdateErrZ {
-               private Result_NoneChannelMonitorUpdateErrZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-               }
-       }
-
-       public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
-               public final ChannelMonitorUpdateErr err;
-               private Result_NoneChannelMonitorUpdateErrZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.CResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
-               }
-       }
-
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state.
-        */
-       public static Result_NoneChannelMonitorUpdateErrZ ok() {
-               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state.
-        */
-       public static Result_NoneChannelMonitorUpdateErrZ err(org.ldk.enums.ChannelMonitorUpdateErr e) {
-               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
-               Reference.reachabilityFence(e);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       /**
-        * Checks if the given object is currently in the success state
-        */
-       public boolean is_ok() {
-               boolean ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       long clone_ptr() {
-               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig`
-        * but with all dynamically-allocated buffers duplicated in new buffers.
-        */
-       public Result_NoneChannelMonitorUpdateErrZ clone() {
-               long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-}
index f239ae3390c89139a5f63b5f73c9bacb17493d9a..10b544fc195021f9d9f1941c35a5b87034a88d04 100644 (file)
@@ -36,7 +36,7 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase {
                private Result_OnionMessageDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_OnionMessageDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
         */
        public static Result_OnionMessageDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_OnionMessageDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_OnionMessageDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OnionMessageDecodeErrorZ ret_hu_conv = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 040c22d619b697094c6daf97c31b36bb07a18460..cb20b4eec34e1b395f8b089ee2bbe9da166cb023 100644 (file)
@@ -36,7 +36,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                private Result_OpenChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_OpenChannelDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
         */
        public static Result_OpenChannelDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 6c102b2dbf26a133b23ff6134ebb4986da5f8bb3..264d98e7a0084b035b4dbe7dc5cb626775bb9cb8 100644 (file)
@@ -36,7 +36,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                private Result_OutPointDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_OutPointDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OutPointDecodeErrorZ in the error state.
         */
        public static Result_OutPointDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_OutPointDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index e055ecce44c1d80907d273bf0dfc18799d8b0533..d67e697283114f4357d2bc8f5950dbb0de1e358b 100644 (file)
@@ -36,7 +36,7 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase {
                private Result_PaymentParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_PaymentParametersDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentParametersDecodeErrorZ in the error state.
         */
        public static Result_PaymentParametersDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_PaymentParametersDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_PaymentParametersDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentParametersDecodeErrorZ ret_hu_conv = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 026ff8a0d68d5ade2d5c51c3838be91a393d1c15..9b87d603f21728348af1404aad780000209cef87 100644 (file)
@@ -36,7 +36,7 @@ public class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
                private Result_PaymentPurposeDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_PaymentPurposeDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentPurposeDecodeErrorZ in the error state.
         */
        public static Result_PaymentPurposeDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_PaymentPurposeDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_PaymentPurposeDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentPurposeDecodeErrorZ ret_hu_conv = Result_PaymentPurposeDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 2306efd077346422118760ee8946eca3ada1b5bf..5c213ff671d90268dc48079ffdf5cc2a01bf8c3c 100644 (file)
@@ -36,7 +36,7 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
                private Result_PhantomRouteHintsDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_PhantomRouteHintsDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the error state.
         */
        public static Result_PhantomRouteHintsDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PhantomRouteHintsDecodeErrorZ ret_hu_conv = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 5df6f99d02f5869312abba8c53d949ab463566e6..cb042b890ac901f41d31ef38b2fcfb4592286397 100644 (file)
@@ -36,7 +36,7 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                private Result_PingDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_PingDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_PingDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PingDecodeErrorZ in the error state.
         */
        public static Result_PingDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_PingDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index c66982546e21002ea6ee9a4b0a2136d06fe8b655..8412a352d03168663181feeadb9c1c44bdb98fe9 100644 (file)
@@ -36,7 +36,7 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                private Result_PongDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_PongDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_PongDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PongDecodeErrorZ in the error state.
         */
        public static Result_PongDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_PongDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 63a5e614b8a26c148fcc6bf13d9d7255fa5e126e..f4a26e1000d321bffe2ea2a44f97cd5078f1bf53 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
                private Result_ProbabilisticScorerDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -62,11 +62,10 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the error state.
         */
        public static Result_ProbabilisticScorerDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ProbabilisticScorerDecodeErrorZ ret_hu_conv = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java b/src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java
new file mode 100644 (file)
index 0000000..3629c96
--- /dev/null
@@ -0,0 +1,85 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_PublicKeyNoneZ extends CommonBase {
+       private Result_PublicKeyNoneZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); } super.finalize();
+       }
+
+       static Result_PublicKeyNoneZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) {
+                       return new Result_PublicKeyNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_PublicKeyNoneZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_PublicKeyNoneZ_OK extends Result_PublicKeyNoneZ {
+               public final byte[] res;
+               private Result_PublicKeyNoneZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.CResult_PublicKeyNoneZ_get_ok(ptr);
+               }
+       }
+
+       public static final class Result_PublicKeyNoneZ_Err extends Result_PublicKeyNoneZ {
+               private Result_PublicKeyNoneZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyNoneZ in the success state.
+        */
+       public static Result_PublicKeyNoneZ ok(byte[] o) {
+               long ret = bindings.CResult_PublicKeyNoneZ_ok(InternalUtils.check_arr_len(o, 33));
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PublicKeyNoneZ ret_hu_conv = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyNoneZ in the error state.
+        */
+       public static Result_PublicKeyNoneZ err() {
+               long ret = bindings.CResult_PublicKeyNoneZ_err();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PublicKeyNoneZ ret_hu_conv = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_PublicKeyNoneZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_PublicKeyNoneZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PublicKeyNoneZ clone() {
+               long ret = bindings.CResult_PublicKeyNoneZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PublicKeyNoneZ ret_hu_conv = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 61db31e31cc354eac29e324dc77261a4d500042f..0982c1984f6cda353525f59efe0dbea4d735c505 100644 (file)
@@ -36,7 +36,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                private Result_QueryChannelRangeDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_QueryChannelRangeDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
         */
        public static Result_QueryChannelRangeDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 9efc8f3c96c8fda459f23b6d740015f97c92979d..3908876dd93546af83e8b631f6e42faaf4b6bbfa 100644 (file)
@@ -36,7 +36,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                private Result_QueryShortChannelIdsDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
         */
        public static Result_QueryShortChannelIdsDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index fa5b47f6a5ceea098134b1a3c5fd2c7dc8d5dd00..8721492a2909b789bc334627cc9ebc137003715e 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                private Result_ReplyChannelRangeDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ReplyChannelRangeDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
         */
        public static Result_ReplyChannelRangeDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 3a67d5e8edd1fd689f3ecad6c72f57c69898dba9..1fd7ff0c11292f52a090d8c1626a22a0861ea8e2 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                private Result_ReplyShortChannelIdsEndDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
         */
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index b003b30bef42740bc56c2c7e895cec774d96535f..1fae0ec167e541a2bc211ddcb2860e385340056b 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                private Result_RevokeAndACKDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RevokeAndACKDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
         */
        public static Result_RevokeAndACKDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index d1c7bd20bcda4a95eddea10070557577b3a2329c..a11e27909175b8770a0772f1bcf9809c461c7214 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                private Result_RouteDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RouteDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteDecodeErrorZ in the error state.
         */
        public static Result_RouteDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index cd2babeea4b4a7bbf21284840dce53967384b1e8..517abd98de87c0560f417411c1f89b7ad5bc4f29 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase {
                private Result_RouteHintDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RouteHintDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintDecodeErrorZ in the error state.
         */
        public static Result_RouteHintDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RouteHintDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteHintDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHintDecodeErrorZ ret_hu_conv = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index cb6708a6e386b41b01e78698b0850bdc9efa9022..476ad683a5fffcd7eb116c9ebd3d37947889d5fc 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase {
                private Result_RouteHintHopDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RouteHintHopDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintHopDecodeErrorZ in the error state.
         */
        public static Result_RouteHintHopDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RouteHintHopDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteHintHopDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHintHopDecodeErrorZ ret_hu_conv = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 258d3b2468bb247e0290e2ae30a0de2ad446e369..fe1af14038d653da62d54938ea13e2e4fb67ae11 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase {
                private Result_RouteHopDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RouteHopDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHopDecodeErrorZ in the error state.
         */
        public static Result_RouteHopDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteHopDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 388cccd53fc3fec66e33423ead36415ac7b23d84..1d72555550b0b5b11ee1043c58a31c781e652b8f 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase {
                private Result_RouteParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RouteParametersDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteParametersDecodeErrorZ in the error state.
         */
        public static Result_RouteParametersDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RouteParametersDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteParametersDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteParametersDecodeErrorZ ret_hu_conv = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 81586c6330d658b78cb4ed3a6c365e4a0a39ec32..962132e92f0e4ef07afc9fa2e187fb5c18e51394 100644 (file)
@@ -36,7 +36,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                private Result_RoutingFeesDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_RoutingFeesDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state.
         */
        public static Result_RoutingFeesDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 3f3d4060b23eda41fc2ba5d5d8305d611369e0ae..45e942fbe061863a38a587e46b694ecca763bb86 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                private Result_ShutdownDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ShutdownDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownDecodeErrorZ in the error state.
         */
        public static Result_ShutdownDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ShutdownDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index de1b7df20bcefe8ad126afcf972fcce7b33f6372..aad003349057258723f336d1ded5e5f745156c26 100644 (file)
@@ -36,7 +36,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
                private Result_ShutdownScriptDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_ShutdownScriptDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptDecodeErrorZ in the error state.
         */
        public static Result_ShutdownScriptDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index fc8769e9746101d3ba74548806fe3fb549d5a587..97dcda4aefef838d38f95013be170d62e7fd0528 100644 (file)
@@ -36,7 +36,7 @@ public class Result_SignDecodeErrorZ extends CommonBase {
                private Result_SignDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_SignDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_SignDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SignDecodeErrorZ in the error state.
         */
        public static Result_SignDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_SignDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index f539d75fe2ae65ed78061647edd180d1542aa8a4..d4e197ccc5420570e4f63d6f09076f08cc7a83a0 100644 (file)
@@ -36,7 +36,7 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                private Result_SpendableOutputDescriptorDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -57,11 +57,10 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
         */
        public static Result_SpendableOutputDescriptorDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index cefc8e5f91e8a9a688798ec08adaa90ec35b1f75..3a35afd54b3dcdb21edd2d08ec7bd96514fb3f90 100644 (file)
@@ -36,7 +36,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
                private Result_StaticPaymentOutputDescriptorDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
         * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state.
         */
        public static Result_StaticPaymentOutputDescriptorDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 0dbfb2554b285b84cb642367336d88a8e72c2149..f65e0a2f155ca5c6e7be072c72bbb1e8daf1e8cd 100644 (file)
@@ -36,7 +36,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                private Result_TxCreationKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_TxCreationKeysDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxCreationKeysDecodeErrorZ in the error state.
         */
        public static Result_TxCreationKeysDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index bfc152ea65cfa657670f30dd31804308229d5fff..22f6c2e13b1fdac3e5788c9b645a156388b880d9 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                private Result_UnsignedChannelAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
         */
        public static Result_UnsignedChannelAnnouncementDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 575502179196217450408443e6efc4785a92da8c..6e7b9f463dd99abd83982db17d1959d43e5dde43 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                private Result_UnsignedChannelUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
         */
        public static Result_UnsignedChannelUpdateDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 36554ef1257b27c69e123ecdae8357dc7a1040a5..83cb46e14375a079dc1f95916ab777f4a2302529 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                private Result_UnsignedNodeAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
         */
        public static Result_UnsignedNodeAnnouncementDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index f76a60614a44f000122117d4fbb936c41da14523..7cd76e5ac56bcb3cc4c980557c3b123b5f4a09d8 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                private Result_UpdateAddHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UpdateAddHTLCDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
         */
        public static Result_UpdateAddHTLCDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 5ab63b6258db799442696a7326ea300c571d088a..c0940e9a3dd279953c207e967d1db2047ccfb5ac 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                private Result_UpdateFailHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UpdateFailHTLCDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
         */
        public static Result_UpdateFailHTLCDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 54a33668b22dbc30dee723473a7e0cc78cb8699c..b2083a0b1003d37a5ef265d6d677759d0529dd0f 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                private Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
         */
        public static Result_UpdateFailMalformedHTLCDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 8ba7425337a11225250f85536b61791a38314a52..e2bbce1c3942f4f67d46413bc20126f9e34bec36 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                private Result_UpdateFeeDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UpdateFeeDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
         */
        public static Result_UpdateFeeDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 60760580f576dc6d84cb48aa0d9bbbd75f089378..9e9a550c2d9aade5386c27d8d9a945aad9a42b55 100644 (file)
@@ -36,7 +36,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                private Result_UpdateFulfillHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
         */
        public static Result_UpdateFulfillHTLCDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 360585268fe78a27203fb534eeb4ce32eda6070d..e76f4c9e8938430853f9668784499bb92790ac91 100644 (file)
@@ -36,7 +36,7 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase {
                private Result_WarningMessageDecodeErrorZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.CResult_WarningMessageDecodeErrorZ_get_err(ptr);
-                       org.ldk.structs.DecodeError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.DecodeError(null, err); }
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
                        if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
                        this.err = err_hu_conv;
                }
@@ -58,11 +58,10 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_WarningMessageDecodeErrorZ in the error state.
         */
        public static Result_WarningMessageDecodeErrorZ err(DecodeError e) {
-               long ret = bindings.CResult_WarningMessageDecodeErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_WarningMessageDecodeErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_WarningMessageDecodeErrorZ ret_hu_conv = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
index 0ed11d6bdc8734f2f0d56f415a85179aa407b28f..f41264e00df8a2950aae6b7fbfed88c120778ecf 100644 (file)
@@ -106,6 +106,23 @@ public class RevokeAndACK extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two RevokeAndACKs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(RevokeAndACK b) {
+               boolean ret = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof RevokeAndACK)) return false;
+               return this.eq((RevokeAndACK)o);
+       }
        /**
         * Serialize the RevokeAndACK object into a byte array which can be read by RevokeAndACK_read
         */
index 856b73d76a7c65661703e6eb2625c4345e34f87f..85f834253582c7bb666cd15d9016ee817ce9de53 100644 (file)
@@ -56,11 +56,13 @@ public class Router extends CommonBase {
                                org.ldk.structs.RouteParameters route_params_hu_conv = null; if (route_params < 0 || route_params > 4096) { route_params_hu_conv = new org.ldk.structs.RouteParameters(null, route_params); }
                                int first_hops_conv_16_len = first_hops.length;
                                ChannelDetails[] first_hops_conv_16_arr = new ChannelDetails[first_hops_conv_16_len];
-                               for (int q = 0; q < first_hops_conv_16_len; q++) {
-                                       long first_hops_conv_16 = first_hops[q];
-                                       org.ldk.structs.ChannelDetails first_hops_conv_16_hu_conv = null; if (first_hops_conv_16 < 0 || first_hops_conv_16 > 4096) { first_hops_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, first_hops_conv_16); }
-                                       if (first_hops_conv_16_hu_conv != null) { first_hops_conv_16_hu_conv.ptrs_to.add(this); };
-                                       first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+                               if (first_hops != null) {
+                                       for (int q = 0; q < first_hops_conv_16_len; q++) {
+                                               long first_hops_conv_16 = first_hops[q];
+                                               org.ldk.structs.ChannelDetails first_hops_conv_16_hu_conv = null; if (first_hops_conv_16 < 0 || first_hops_conv_16 > 4096) { first_hops_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, first_hops_conv_16); }
+                                               if (first_hops_conv_16_hu_conv != null) { first_hops_conv_16_hu_conv.ptrs_to.add(this); };
+                                               first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+                                       }
                                }
                                org.ldk.structs.InFlightHtlcs inflight_htlcs_hu_conv = null; if (inflight_htlcs < 0 || inflight_htlcs > 4096) { inflight_htlcs_hu_conv = new org.ldk.structs.InFlightHtlcs(null, inflight_htlcs); }
                                if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); };
@@ -136,7 +138,7 @@ public class Router extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(route_params); };
-               for (ChannelDetails first_hops_conv_16: first_hops) { if (this != null) { this.ptrs_to.add(first_hops_conv_16); }; };
+               if (first_hops != null) { for (ChannelDetails first_hops_conv_16: first_hops) { if (this != null) { this.ptrs_to.add(first_hops_conv_16); }; } };
                if (this != null) { this.ptrs_to.add(inflight_htlcs); };
                // 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.
index aacd7daa095ba7092727e5ddb5b3c5684aed99f4..efccb4bf93fab1a92c592cd4dbceb7a40e0d0bae 100644 (file)
@@ -67,8 +67,12 @@ public class RoutingMessageHandler extends CommonBase {
                 * Called when a connection is established with a peer. This can be used to
                 * perform routing table synchronization using a strategy defined by the
                 * implementor.
+                * 
+                * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+                * with us. Implementors should be somewhat conservative about doing so, however, as other
+                * message handlers may still wish to communicate with this peer.
                 */
-               void peer_connected(byte[] their_node_id, Init init);
+               Result_NoneNoneZ peer_connected(byte[] their_node_id, Init init);
                /**
                 * Handles the reply of a query we initiated to learn about channels
                 * for a given range of blocks. We can expect to receive one or more
@@ -144,10 +148,12 @@ public class RoutingMessageHandler extends CommonBase {
                                long result = ret == null ? 0 : ret.clone_ptr();
                                return result;
                        }
-                       @Override public void peer_connected(byte[] their_node_id, long init) {
+                       @Override public long peer_connected(byte[] their_node_id, long init) {
                                org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
-                               arg.peer_connected(their_node_id, init_hu_conv);
+                               Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv);
                                Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
                        }
                        @Override public long handle_reply_channel_range(byte[] their_node_id, long msg) {
                                org.ldk.structs.ReplyChannelRange msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ReplyChannelRange(null, msg); }
@@ -287,13 +293,20 @@ public class RoutingMessageHandler extends CommonBase {
         * Called when a connection is established with a peer. This can be used to
         * perform routing table synchronization using a strategy defined by the
         * implementor.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public void peer_connected(byte[] their_node_id, Init init) {
-               bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr);
+       public Result_NoneNoneZ peer_connected(byte[] their_node_id, Init init) {
+               long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(init);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(init); };
+               return ret_hu_conv;
        }
 
        /**
index 573aea9d50fb9cae251ffb51efdc4fbc86253758..a79de30933c4be8ac0c66489ac40f22404bd769a 100644 (file)
@@ -11,7 +11,7 @@ import javax.annotation.Nullable;
 /**
  * Errors that may occur when [sending an onion message].
  * 
- * [sending an onion message]: OnionMessenger::send_onion_message
+ * [sending an onion message]: OnionMessenger::send_custom_onion_message
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class SendError extends CommonBase {
@@ -35,6 +35,9 @@ public class SendError extends CommonBase {
                if (raw_val.getClass() == bindings.LDKSendError.InvalidFirstHop.class) {
                        return new InvalidFirstHop(ptr, (bindings.LDKSendError.InvalidFirstHop)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKSendError.InvalidMessage.class) {
+                       return new InvalidMessage(ptr, (bindings.LDKSendError.InvalidMessage)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKSendError.BufferFull.class) {
                        return new BufferFull(ptr, (bindings.LDKSendError.BufferFull)raw_val);
                }
@@ -77,6 +80,14 @@ public class SendError extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * Onion message contents must have a TLV type >= 64.
+        */
+       public final static class InvalidMessage extends SendError {
+               private InvalidMessage(long ptr, bindings.LDKSendError.InvalidMessage obj) {
+                       super(null, ptr);
+               }
+       }
        /**
         * Our next-hop peer's buffer was full or our total outbound buffer was full.
         */
@@ -148,6 +159,17 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new InvalidMessage-variant SendError
+        */
+       public static SendError invalid_message() {
+               long ret = bindings.SendError_invalid_message();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new BufferFull-variant SendError
         */
@@ -159,4 +181,19 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two SendErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(SendError b) {
+               boolean ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof SendError)) return false;
+               return this.eq((SendError)o);
+       }
 }
index 16ec7a18526eeefc533985210102577d4237ebe9..9520c78d4d82dcdb7f70da01fa4be6499c6a2feb 100644 (file)
@@ -89,6 +89,23 @@ public class Shutdown extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Shutdowns contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Shutdown b) {
+               boolean ret = bindings.Shutdown_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Shutdown)) return false;
+               return this.eq((Shutdown)o);
+       }
        /**
         * Serialize the Shutdown object into a byte array which can be read by Shutdown_read
         */
index c40b2b77a564f3e17e045aec3ebd5bc9e54655e5..6fa57b2d84b02631535f239fb3216229f6717ad9 100644 (file)
@@ -40,6 +40,23 @@ public class ShutdownScript extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ShutdownScripts contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(ShutdownScript b) {
+               boolean ret = bindings.ShutdownScript_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ShutdownScript)) return false;
+               return this.eq((ShutdownScript)o);
+       }
        /**
         * Serialize the ShutdownScript object into a byte array which can be read by ShutdownScript_read
         */
index 902795cabeafd5ebf073a14dac8e4cd1855fc853..e2cf0b2ffbe6163a75e4b40885a265adffb1f4c5 100644 (file)
@@ -181,6 +181,21 @@ public class SpendableOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two SpendableOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(SpendableOutputDescriptor b) {
+               boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof SpendableOutputDescriptor)) return false;
+               return this.eq((SpendableOutputDescriptor)o);
+       }
        /**
         * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
         */
index bdfac8e2245c620a4a14a91e4ef22648feccd99a..b226186babd1051e79c0fdeed1d67a8807fdeb47 100644 (file)
@@ -139,6 +139,23 @@ public class StaticPaymentOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two StaticPaymentOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(StaticPaymentOutputDescriptor b) {
+               boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof StaticPaymentOutputDescriptor)) return false;
+               return this.eq((StaticPaymentOutputDescriptor)o);
+       }
        /**
         * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
         */
index 05126d0c83eadaa5a7ead1ff06b14f3c2bab3d40..e02ea66434847e5843bd0c985f5c5194a4509968 100644 (file)
@@ -140,6 +140,23 @@ public class TxCreationKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two TxCreationKeyss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(TxCreationKeys b) {
+               boolean ret = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof TxCreationKeys)) return false;
+               return this.eq((TxCreationKeys)o);
+       }
        long clone_ptr() {
                long ret = bindings.TxCreationKeys_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
index fc5f905a2ec4cc5f6ed4789b3e029b0b5687ded9..d042e41b80565c763d7caf0a566417c2c69f8119 100644 (file)
@@ -168,6 +168,23 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedChannelAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UnsignedChannelAnnouncement b) {
+               boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UnsignedChannelAnnouncement)) return false;
+               return this.eq((UnsignedChannelAnnouncement)o);
+       }
        /**
         * Serialize the UnsignedChannelAnnouncement object into a byte array which can be read by UnsignedChannelAnnouncement_read
         */
index b26042a90a5b675f88e67f258330b8864906d9a4..7805cc07b208ec45311ac3105d1bdebdc72b713e 100644 (file)
@@ -259,6 +259,23 @@ public class UnsignedChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedChannelUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UnsignedChannelUpdate b) {
+               boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UnsignedChannelUpdate)) return false;
+               return this.eq((UnsignedChannelUpdate)o);
+       }
        /**
         * Serialize the UnsignedChannelUpdate object into a byte array which can be read by UnsignedChannelUpdate_read
         */
index 69713e554ebf3b8b7019e0174913dcc9038e4d9b..f9152c40f2e23781a5951eebaf56e0ac0a288335 100644 (file)
@@ -164,6 +164,23 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedNodeAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UnsignedNodeAnnouncement b) {
+               boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UnsignedNodeAnnouncement)) return false;
+               return this.eq((UnsignedNodeAnnouncement)o);
+       }
        /**
         * Serialize the UnsignedNodeAnnouncement object into a byte array which can be read by UnsignedNodeAnnouncement_read
         */
index 0b479f6cfdc6c846b169e24d49ce78a2b9a622f1..d827577112b28413e886c404ef5355402ba4649a 100644 (file)
@@ -128,6 +128,23 @@ public class UpdateAddHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateAddHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UpdateAddHTLC b) {
+               boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UpdateAddHTLC)) return false;
+               return this.eq((UpdateAddHTLC)o);
+       }
        /**
         * Serialize the UpdateAddHTLC object into a byte array which can be read by UpdateAddHTLC_read
         */
index 39af52793169d1b4afe61828fd40ebcbe79c6449..5d62006e945666982c369c12710a087f5a0688d0 100644 (file)
@@ -74,6 +74,23 @@ public class UpdateFailHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFailHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UpdateFailHTLC b) {
+               boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UpdateFailHTLC)) return false;
+               return this.eq((UpdateFailHTLC)o);
+       }
        /**
         * Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read
         */
index 1e35684b655bfdc269c44d9cee72006fc7c01dbe..c1188c0350f0ad2606c5b9e20719ad4a960820f4 100644 (file)
@@ -92,6 +92,23 @@ public class UpdateFailMalformedHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFailMalformedHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UpdateFailMalformedHTLC b) {
+               boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UpdateFailMalformedHTLC)) return false;
+               return this.eq((UpdateFailMalformedHTLC)o);
+       }
        /**
         * Serialize the UpdateFailMalformedHTLC object into a byte array which can be read by UpdateFailMalformedHTLC_read
         */
index abdf853e545abfbdf616832702424279c17cfa7f..1d1a642990ed5bc18ae8a47512c5822db8e7a25c 100644 (file)
@@ -87,6 +87,23 @@ public class UpdateFee extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFees contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UpdateFee b) {
+               boolean ret = bindings.UpdateFee_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UpdateFee)) return false;
+               return this.eq((UpdateFee)o);
+       }
        /**
         * Serialize the UpdateFee object into a byte array which can be read by UpdateFee_read
         */
index 4f5565ab4bbb71935301a78fe7de757286a643b2..9e66df6f3c3ff387148a333a4c5e0ac7931f3ef8 100644 (file)
@@ -106,6 +106,23 @@ public class UpdateFulfillHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFulfillHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(UpdateFulfillHTLC b) {
+               boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UpdateFulfillHTLC)) return false;
+               return this.eq((UpdateFulfillHTLC)o);
+       }
        /**
         * Serialize the UpdateFulfillHTLC object into a byte array which can be read by UpdateFulfillHTLC_read
         */
index 4990ad25faeecf5a2ed0900e020a703c19e5f211..db35dc91eec670f62a38421558e8018a12ffb375 100644 (file)
@@ -128,6 +128,42 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Fetches the set of [`NodeFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static NodeFeatures provided_node_features() {
+               long ret = bindings.provided_node_features();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NodeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static ChannelFeatures provided_channel_features() {
+               long ret = bindings.provided_channel_features();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Fetches the set of [`InitFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static InitFeatures provided_init_features() {
+               long ret = bindings.provided_init_features();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
         */
@@ -462,7 +498,7 @@ public class UtilMethods {
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(route_params); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(network_graph); };
-               for (ChannelDetails first_hops_conv_16: first_hops) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(first_hops_conv_16); }; };
+               if (first_hops != null) { for (ChannelDetails first_hops_conv_16: first_hops) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(first_hops_conv_16); }; } };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(scorer); };
                return ret_hu_conv;
@@ -523,19 +559,21 @@ public class UtilMethods {
         * 
         * Note that payment_hash (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_phantom_invoice(Option_u64Z amt_msat, @Nullable byte[] payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, KeysInterface keys_manager, org.ldk.enums.Currency network) {
-               long ret = bindings.create_phantom_invoice(amt_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, keys_manager == null ? 0 : keys_manager.ptr, network);
+       public static Result_InvoiceSignOrCreationErrorZ create_phantom_invoice(Option_u64Z amt_msat, @Nullable byte[] payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network) {
+               long ret = bindings.create_phantom_invoice(amt_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(description);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
                Reference.reachabilityFence(phantom_route_hints);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                for (PhantomRouteHints phantom_route_hints_conv_19: phantom_route_hints) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(phantom_route_hints_conv_19); }; };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                return ret_hu_conv;
        }
 
@@ -574,20 +612,22 @@ public class UtilMethods {
         * 
         * Note that payment_hash (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(Option_u64Z amt_msat, @Nullable byte[] payment_hash, int invoice_expiry_delta_secs, Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, KeysInterface keys_manager, org.ldk.enums.Currency network) {
-               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, keys_manager == null ? 0 : keys_manager.ptr, network);
+       public static Result_InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(Option_u64Z amt_msat, @Nullable byte[] payment_hash, int invoice_expiry_delta_secs, Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network) {
+               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
                Reference.reachabilityFence(description_hash);
                Reference.reachabilityFence(phantom_route_hints);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(description_hash); };
                for (PhantomRouteHints phantom_route_hints_conv_19: phantom_route_hints) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(phantom_route_hints_conv_19); }; };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                return ret_hu_conv;
        }
 
@@ -601,10 +641,11 @@ public class UtilMethods {
         * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
         * in excess of the current time.
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, org.ldk.enums.Currency network, Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs) {
-               long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs);
+       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network, Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs) {
+               long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(description);
@@ -613,6 +654,7 @@ public class UtilMethods {
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                return ret_hu_conv;
        }
 
@@ -627,10 +669,11 @@ public class UtilMethods {
         * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
         * in excess of the current time.
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(ChannelManager channelmanager, KeysInterface keys_manager, org.ldk.enums.Currency network, Option_u64Z amt_msat, Sha256 description_hash, int invoice_expiry_delta_secs) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs);
+       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(ChannelManager channelmanager, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network, Option_u64Z amt_msat, Sha256 description_hash, int invoice_expiry_delta_secs) {
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(description_hash);
@@ -639,6 +682,7 @@ public class UtilMethods {
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(description_hash); };
                return ret_hu_conv;
        }
@@ -648,10 +692,11 @@ public class UtilMethods {
         * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
         * available and the current time is supplied by the caller.
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(ChannelManager channelmanager, KeysInterface keys_manager, org.ldk.enums.Currency network, Option_u64Z amt_msat, Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs);
+       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(ChannelManager channelmanager, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network, Option_u64Z amt_msat, Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs) {
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(description_hash);
@@ -661,6 +706,7 @@ public class UtilMethods {
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(description_hash); };
                return ret_hu_conv;
        }
@@ -670,10 +716,11 @@ public class UtilMethods {
         * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
         * available and the current time is supplied by the caller.
         */
-       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(ChannelManager channelmanager, KeysInterface keys_manager, org.ldk.enums.Currency network, Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs) {
-               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs);
+       public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(ChannelManager channelmanager, KeysInterface keys_manager, Logger logger, org.ldk.enums.Currency network, Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs) {
+               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, keys_manager == null ? 0 : keys_manager.ptr, logger == null ? 0 : logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(keys_manager);
+               Reference.reachabilityFence(logger);
                Reference.reachabilityFence(network);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(description);
@@ -683,6 +730,7 @@ public class UtilMethods {
                Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channelmanager); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
                return ret_hu_conv;
        }
 
index d7d8c2ecb8d93461cd1081308358139f4c0875bb..354cbcfca8a44e69c56cf6ffa4bcf026b0fb4cd1 100644 (file)
@@ -97,6 +97,23 @@ public class WarningMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two WarningMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(WarningMessage b) {
+               boolean ret = bindings.WarningMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof WarningMessage)) return false;
+               return this.eq((WarningMessage)o);
+       }
        /**
         * Serialize the WarningMessage object into a byte array which can be read by WarningMessage_read
         */
index 82ecfc05ddb6da30d1bad7894b6252fc25c08fc7..dd0311111f223041ebedc62846a12c1c3bc36009 100644 (file)
@@ -23,10 +23,10 @@ import javax.annotation.Nullable;
  * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing
  * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it
  * could result in a revoked transaction being broadcast, allowing the counterparty to claim all
- * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle
+ * funds in the channel. See [`ChannelMonitorUpdateStatus`] for more details about how to handle
  * multiple instances.
  * 
- * [`PermanentFailure`]: ChannelMonitorUpdateErr::PermanentFailure
+ * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Watch extends CommonBase {
@@ -50,23 +50,23 @@ public class Watch extends CommonBase {
                 * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
                 * calling [`block_connected`] and [`block_disconnected`] on the monitor.
                 * 
-                * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+                * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
                 * the given `funding_txo` has previously been registered via `watch_channel`.
                 * 
                 * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
                 * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
                 * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
                 */
-               Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, ChannelMonitor monitor);
+               ChannelMonitorUpdateStatus watch_channel(OutPoint funding_txo, ChannelMonitor monitor);
                /**
                 * Updates a channel identified by `funding_txo` by applying `update` to its monitor.
                 * 
                 * Implementations must call [`update_monitor`] with the given update. See
-                * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+                * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
                 * 
                 * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
                 */
-               Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo, ChannelMonitorUpdate update);
+               ChannelMonitorUpdateStatus update_channel(OutPoint funding_txo, ChannelMonitorUpdate update);
                /**
                 * Returns any monitor events since the last call. Subsequent calls must only return new
                 * events.
@@ -76,7 +76,7 @@ public class Watch extends CommonBase {
                 * to disk.
                 * 
                 * For details on asynchronous [`ChannelMonitor`] updating and returning
-                * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+                * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
                 */
                ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events();
        }
@@ -84,25 +84,23 @@ public class Watch extends CommonBase {
        public static Watch new_impl(WatchInterface arg) {
                final LDKWatchHolder impl_holder = new LDKWatchHolder();
                impl_holder.held = new Watch(new bindings.LDKWatch() {
-                       @Override public long watch_channel(long funding_txo, long monitor) {
+                       @Override public ChannelMonitorUpdateStatus watch_channel(long funding_txo, long monitor) {
                                org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
                                if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitor monitor_hu_conv = null; if (monitor < 0 || monitor > 4096) { monitor_hu_conv = new org.ldk.structs.ChannelMonitor(null, monitor); }
                                if (monitor_hu_conv != null) { monitor_hu_conv.ptrs_to.add(this); };
-                               Result_NoneChannelMonitorUpdateErrZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
-                               return result;
+                               return ret;
                        }
-                       @Override public long update_channel(long funding_txo, long update) {
+                       @Override public ChannelMonitorUpdateStatus update_channel(long funding_txo, long update) {
                                org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
                                if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); }
                                if (update_hu_conv != null) { update_hu_conv.ptrs_to.add(this); };
-                               Result_NoneChannelMonitorUpdateErrZ ret = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
-                               return result;
+                               return ret;
                        }
                        @Override public long[] release_pending_monitor_events() {
                                ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events();
@@ -120,43 +118,39 @@ public class Watch extends CommonBase {
         * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
         * calling [`block_connected`] and [`block_disconnected`] on the monitor.
         * 
-        * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+        * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
         * the given `funding_txo` has previously been registered via `watch_channel`.
         * 
         * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
         * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
         * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
         */
-       public Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, ChannelMonitor monitor) {
-               long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr);
+       public ChannelMonitorUpdateStatus watch_channel(OutPoint funding_txo, ChannelMonitor monitor) {
+               ChannelMonitorUpdateStatus ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(monitor);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(funding_txo); };
                if (this != null) { this.ptrs_to.add(monitor); };
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
         * Updates a channel identified by `funding_txo` by applying `update` to its monitor.
         * 
         * Implementations must call [`update_monitor`] with the given update. See
-        * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+        * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
         * 
         * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
         */
-       public Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) {
-               long ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr);
+       public ChannelMonitorUpdateStatus update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) {
+               ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(update);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(funding_txo); };
                if (this != null) { this.ptrs_to.add(update); };
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
@@ -168,7 +162,7 @@ public class Watch extends CommonBase {
         * to disk.
         * 
         * For details on asynchronous [`ChannelMonitor`] updating and returning
-        * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
         */
        public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() {
                long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
index f745678a41efa5fb4f86638ca66a5c87778a566c..ba3a0745184bd26fef6719a9ab68c1a8a3b561b0 100644 (file)
@@ -126,6 +126,23 @@ public class WatchedOutput extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two WatchedOutputs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(WatchedOutput b) {
+               boolean ret = bindings.WatchedOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof WatchedOutput)) return false;
+               return this.eq((WatchedOutput)o);
+       }
        /**
         * Checks if two WatchedOutputs contain equal inner contents.
         */
index f26c2ae06daa140816fdb9cb16da1d6aecedcb86..d9c3f6ef8364a4f89ec1c2653f5d747455325345 100644 (file)
@@ -2,7 +2,7 @@ package org.ldk.util;
 
 public class InternalUtils {
     public static byte[] check_arr_len(byte[] arr, int length) throws IllegalArgumentException {
-        if (arr.length != length) {
+        if (arr != null && arr.length != length) {
             throw new IllegalArgumentException("Array must be of fixed size " + length + " but was of length " + arr.length);
         }
         return arr;
index feb725437b2217eb6d8dea5c267cb5240de4ce43..503dd73379d5aa01f116a57e40481048d35ada43 100644 (file)
@@ -279,36 +279,42 @@ static inline jclass LDKCOption_NoneZ_to_java(JNIEnv *env, LDKCOption_NoneZ val)
        }
 }
 
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_java(JNIEnv *env, jclass clz) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to ChannelMonitorUpdateErr.ordinal() from rust threw an exception.");
+               (*env)->FatalError(env, "A call to ChannelMonitorUpdateStatus.ordinal() from rust threw an exception.");
        }
        switch (ord) {
-               case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
-               case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+               case 0: return LDKChannelMonitorUpdateStatus_Completed;
+               case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+               case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
        }
-       (*env)->FatalError(env, "A call to ChannelMonitorUpdateErr.ordinal() from rust returned an invalid value.");
+       (*env)->FatalError(env, "A call to ChannelMonitorUpdateStatus.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
 }
-static jclass ChannelMonitorUpdateErr_class = NULL;
-static jfieldID ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure = NULL;
-static jfieldID ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateErr_init (JNIEnv *env, jclass clz) {
-       ChannelMonitorUpdateErr_class = (*env)->NewGlobalRef(env, clz);
-       CHECK(ChannelMonitorUpdateErr_class != NULL);
-       ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateErr_class, "LDKChannelMonitorUpdateErr_TemporaryFailure", "Lorg/ldk/enums/ChannelMonitorUpdateErr;");
-       CHECK(ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure != NULL);
-       ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateErr_class, "LDKChannelMonitorUpdateErr_PermanentFailure", "Lorg/ldk/enums/ChannelMonitorUpdateErr;");
-       CHECK(ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure != NULL);
-}
-static inline jclass LDKChannelMonitorUpdateErr_to_java(JNIEnv *env, LDKChannelMonitorUpdateErr val) {
+static jclass ChannelMonitorUpdateStatus_class = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateStatus_init (JNIEnv *env, jclass clz) {
+       ChannelMonitorUpdateStatus_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(ChannelMonitorUpdateStatus_class != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_Completed", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_InProgress", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_PermanentFailure", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure != NULL);
+}
+static inline jclass LDKChannelMonitorUpdateStatus_to_java(JNIEnv *env, LDKChannelMonitorUpdateStatus val) {
        switch (val) {
-               case LDKChannelMonitorUpdateErr_TemporaryFailure:
-                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateErr_class, ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure);
-               case LDKChannelMonitorUpdateErr_PermanentFailure:
-                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateErr_class, ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure);
+               case LDKChannelMonitorUpdateStatus_Completed:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed);
+               case LDKChannelMonitorUpdateStatus_InProgress:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress);
+               case LDKChannelMonitorUpdateStatus_PermanentFailure:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure);
                default: abort();
        }
 }
@@ -1085,6 +1091,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteNoneZ_1ge
        CResult_BlindedRouteNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKDecodeError_UnknownVersion_class = NULL;
+static jmethodID LDKDecodeError_UnknownVersion_meth = NULL;
+static jclass LDKDecodeError_UnknownRequiredFeature_class = NULL;
+static jmethodID LDKDecodeError_UnknownRequiredFeature_meth = NULL;
+static jclass LDKDecodeError_InvalidValue_class = NULL;
+static jmethodID LDKDecodeError_InvalidValue_meth = NULL;
+static jclass LDKDecodeError_ShortRead_class = NULL;
+static jmethodID LDKDecodeError_ShortRead_meth = NULL;
+static jclass LDKDecodeError_BadLengthDescriptor_class = NULL;
+static jmethodID LDKDecodeError_BadLengthDescriptor_meth = NULL;
+static jclass LDKDecodeError_Io_class = NULL;
+static jmethodID LDKDecodeError_Io_meth = NULL;
+static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
+static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
+       LDKDecodeError_UnknownVersion_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
+       CHECK(LDKDecodeError_UnknownVersion_class != NULL);
+       LDKDecodeError_UnknownVersion_meth = (*env)->GetMethodID(env, LDKDecodeError_UnknownVersion_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnknownVersion_meth != NULL);
+       LDKDecodeError_UnknownRequiredFeature_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownRequiredFeature"));
+       CHECK(LDKDecodeError_UnknownRequiredFeature_class != NULL);
+       LDKDecodeError_UnknownRequiredFeature_meth = (*env)->GetMethodID(env, LDKDecodeError_UnknownRequiredFeature_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnknownRequiredFeature_meth != NULL);
+       LDKDecodeError_InvalidValue_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$InvalidValue"));
+       CHECK(LDKDecodeError_InvalidValue_class != NULL);
+       LDKDecodeError_InvalidValue_meth = (*env)->GetMethodID(env, LDKDecodeError_InvalidValue_class, "<init>", "()V");
+       CHECK(LDKDecodeError_InvalidValue_meth != NULL);
+       LDKDecodeError_ShortRead_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$ShortRead"));
+       CHECK(LDKDecodeError_ShortRead_class != NULL);
+       LDKDecodeError_ShortRead_meth = (*env)->GetMethodID(env, LDKDecodeError_ShortRead_class, "<init>", "()V");
+       CHECK(LDKDecodeError_ShortRead_meth != NULL);
+       LDKDecodeError_BadLengthDescriptor_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$BadLengthDescriptor"));
+       CHECK(LDKDecodeError_BadLengthDescriptor_class != NULL);
+       LDKDecodeError_BadLengthDescriptor_meth = (*env)->GetMethodID(env, LDKDecodeError_BadLengthDescriptor_class, "<init>", "()V");
+       CHECK(LDKDecodeError_BadLengthDescriptor_meth != NULL);
+       LDKDecodeError_Io_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$Io"));
+       CHECK(LDKDecodeError_Io_class != NULL);
+       LDKDecodeError_Io_meth = (*env)->GetMethodID(env, LDKDecodeError_Io_class, "<init>", "(Lorg/ldk/enums/IOError;)V");
+       CHECK(LDKDecodeError_Io_meth != NULL);
+       LDKDecodeError_UnsupportedCompression_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnsupportedCompression"));
+       CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
+       LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKDecodeError_UnknownVersion: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnknownVersion_class, LDKDecodeError_UnknownVersion_meth);
+               }
+               case LDKDecodeError_UnknownRequiredFeature: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnknownRequiredFeature_class, LDKDecodeError_UnknownRequiredFeature_meth);
+               }
+               case LDKDecodeError_InvalidValue: {
+                       return (*env)->NewObject(env, LDKDecodeError_InvalidValue_class, LDKDecodeError_InvalidValue_meth);
+               }
+               case LDKDecodeError_ShortRead: {
+                       return (*env)->NewObject(env, LDKDecodeError_ShortRead_class, LDKDecodeError_ShortRead_meth);
+               }
+               case LDKDecodeError_BadLengthDescriptor: {
+                       return (*env)->NewObject(env, LDKDecodeError_BadLengthDescriptor_class, LDKDecodeError_BadLengthDescriptor_meth);
+               }
+               case LDKDecodeError_Io: {
+                       jclass io_conv = LDKIOError_to_java(env, obj->io);
+                       return (*env)->NewObject(env, LDKDecodeError_Io_class, LDKDecodeError_Io_meth, io_conv);
+               }
+               case LDKDecodeError_UnsupportedCompression: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
+               }
+               default: abort();
+       }
+}
 static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
        LDKBlindedRoute ret = *owner->contents.result;
        ret.is_owned = false;
@@ -1100,16 +1185,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecode
 }
 
 static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1128,16 +1211,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1174,16 +1255,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommit
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommitmentSecretsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1244,16 +1323,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDeco
 }
 
 static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1272,16 +1349,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysD
 }
 
 static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1353,16 +1428,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommit
 }
 
 static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1381,16 +1454,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChanne
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1409,16 +1480,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransaction
 }
 
 static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1437,16 +1506,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTr
 }
 
 static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1465,16 +1532,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTra
 }
 
 static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1516,16 +1581,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransact
 }
 
 static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1595,16 +1658,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDeco
 }
 
 static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2286,16 +2347,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2321,16 +2380,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2349,16 +2406,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDec
 }
 
 static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2418,16 +2473,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersD
 }
 
 static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2453,16 +2506,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2481,16 +2532,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecode
 }
 
 static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2576,16 +2625,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDeco
 }
 
 static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2723,16 +2770,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureRe
 }
 
 static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureReasonZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2823,16 +2868,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDesti
 }
 
 static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDestinationZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3319,16 +3362,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDec
 }
 
 static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3805,31 +3846,12 @@ static inline LDKCVec_TxidZ CVec_TxidZ_clone(const LDKCVec_TxidZ *orig) {
        }
        return ret;
 }
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
 static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
 static jclass LDKMonitorEvent_CommitmentTxConfirmed_class = NULL;
 static jmethodID LDKMonitorEvent_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKMonitorEvent_UpdateCompleted_class = NULL;
-static jmethodID LDKMonitorEvent_UpdateCompleted_meth = NULL;
+static jclass LDKMonitorEvent_Completed_class = NULL;
+static jmethodID LDKMonitorEvent_Completed_meth = NULL;
 static jclass LDKMonitorEvent_UpdateFailed_class = NULL;
 static jmethodID LDKMonitorEvent_UpdateFailed_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNIEnv *env, jclass clz) {
@@ -3843,11 +3865,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        CHECK(LDKMonitorEvent_CommitmentTxConfirmed_class != NULL);
        LDKMonitorEvent_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxConfirmed_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_CommitmentTxConfirmed_meth != NULL);
-       LDKMonitorEvent_UpdateCompleted_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$UpdateCompleted"));
-       CHECK(LDKMonitorEvent_UpdateCompleted_class != NULL);
-       LDKMonitorEvent_UpdateCompleted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_UpdateCompleted_class, "<init>", "(JJ)V");
-       CHECK(LDKMonitorEvent_UpdateCompleted_meth != NULL);
+       LDKMonitorEvent_Completed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
+       CHECK(LDKMonitorEvent_Completed_class != NULL);
+       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+       CHECK(LDKMonitorEvent_Completed_meth != NULL);
        LDKMonitorEvent_UpdateFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$UpdateFailed"));
        CHECK(LDKMonitorEvent_UpdateFailed_class != NULL);
@@ -3871,13 +3893,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
                        return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxConfirmed_class, LDKMonitorEvent_CommitmentTxConfirmed_meth, commitment_tx_confirmed_ref);
                }
-               case LDKMonitorEvent_UpdateCompleted: {
-                       LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+               case LDKMonitorEvent_Completed: {
+                       LDKOutPoint funding_txo_var = obj->completed.funding_txo;
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
-                       int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
-                       return (*env)->NewObject(env, LDKMonitorEvent_UpdateCompleted_class, LDKMonitorEvent_UpdateCompleted_meth, funding_txo_ref, monitor_update_id_conv);
+                       int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
+                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
                }
                case LDKMonitorEvent_UpdateFailed: {
                        LDKOutPoint update_failed_var = obj->update_failed;
@@ -3962,16 +3984,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorer
 }
 
 static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4120,16 +4140,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
 }
 
 static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4148,16 +4166,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecode
 }
 
 static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4176,16 +4192,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDec
 }
 
 static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4204,16 +4218,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecode
 }
 
 static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4232,16 +4244,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDec
 }
 
 static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4260,16 +4270,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
 }
 
 static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4288,16 +4296,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4314,16 +4320,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUp
 }
 
 static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUpdateZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4587,16 +4591,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoD
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4615,16 +4617,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeE
 }
 
 static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4643,16 +4643,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeE
 }
 
 static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4754,16 +4752,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementIn
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4782,16 +4778,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4810,16 +4804,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4838,16 +4830,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
 }
 
 static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4903,16 +4893,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutp
 }
 
 static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4931,16 +4919,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutpu
 }
 
 static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4957,16 +4943,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
 }
 
 static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5105,6 +5089,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1get_1
        CResult_SecretKeyNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form);
+       return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
 static jclass LDKCOption_ScalarZ_Some_class = NULL;
 static jmethodID LDKCOption_ScalarZ_Some_meth = NULL;
 static jclass LDKCOption_ScalarZ_None_class = NULL;
@@ -5169,6 +5173,7 @@ typedef struct LDKBaseSign_JCalls {
        jmethodID sign_justice_revoked_htlc_meth;
        jmethodID sign_counterparty_htlc_transaction_meth;
        jmethodID sign_closing_transaction_meth;
+       jmethodID sign_holder_anchor_input_meth;
        jmethodID sign_channel_announcement_meth;
        jmethodID ready_channel_meth;
 } LDKBaseSign_JCalls;
@@ -5542,6 +5547,36 @@ LDKCResult_SignatureNoneZ sign_closing_transaction_LDKBaseSign_jcall(const void*
        }
        return ret_conv;
 }
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+       LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKTransaction anchor_tx_var = anchor_tx;
+       int8_tArray anchor_tx_arr = (*env)->NewByteArray(env, anchor_tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, anchor_tx_arr, 0, anchor_tx_var.datalen, anchor_tx_var.data);
+       Transaction_free(anchor_tx_var);
+       int64_t input_conv = input;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_holder_anchor_input_meth, anchor_tx_arr, input_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_holder_anchor_input in LDKBaseSign from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
 LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
        JNIEnv *env;
@@ -5626,6 +5661,8 @@ static inline LDKBaseSign LDKBaseSign_init (JNIEnv *env, jclass clz, jobject o,
        CHECK(calls->sign_counterparty_htlc_transaction_meth != NULL);
        calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "(J)J");
        CHECK(calls->sign_closing_transaction_meth != NULL);
+       calls->sign_holder_anchor_input_meth = (*env)->GetMethodID(env, c, "sign_holder_anchor_input", "([BJ)J");
+       CHECK(calls->sign_holder_anchor_input_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");
@@ -5649,6 +5686,7 @@ static inline LDKBaseSign LDKBaseSign_init (JNIEnv *env, jclass clz, jobject o,
                .sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
                .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
                .sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+               .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
                .sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
                .ready_channel = ready_channel_LDKBaseSign_jcall,
                .free = LDKBaseSign_JCalls_free,
@@ -5847,6 +5885,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1closing_1tr
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1holder_1anchor_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray anchor_tx, int64_t input) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+       LDKTransaction anchor_tx_ref;
+       anchor_tx_ref.datalen = (*env)->GetArrayLength(env, anchor_tx);
+       anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, anchor_tx, 0, anchor_tx_ref.datalen, anchor_tx_ref.data);
+       anchor_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -6000,16 +6052,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6086,16 +6136,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
 }
 
 static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6225,8 +6273,8 @@ 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;
+static jclass LDKAPIError_MonitorUpdateInProgress_class = NULL;
+static jmethodID LDKAPIError_MonitorUpdateInProgress_meth = NULL;
 static jclass LDKAPIError_IncompatibleShutdownScript_class = NULL;
 static jmethodID LDKAPIError_IncompatibleShutdownScript_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv *env, jclass clz) {
@@ -6250,11 +6298,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv
        CHECK(LDKAPIError_ChannelUnavailable_class != NULL);
        LDKAPIError_ChannelUnavailable_meth = (*env)->GetMethodID(env, LDKAPIError_ChannelUnavailable_class, "<init>", "(Ljava/lang/String;)V");
        CHECK(LDKAPIError_ChannelUnavailable_meth != NULL);
-       LDKAPIError_MonitorUpdateFailed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/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);
+       LDKAPIError_MonitorUpdateInProgress_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAPIError$MonitorUpdateInProgress"));
+       CHECK(LDKAPIError_MonitorUpdateInProgress_class != NULL);
+       LDKAPIError_MonitorUpdateInProgress_meth = (*env)->GetMethodID(env, LDKAPIError_MonitorUpdateInProgress_class, "<init>", "()V");
+       CHECK(LDKAPIError_MonitorUpdateInProgress_meth != NULL);
        LDKAPIError_IncompatibleShutdownScript_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAPIError$IncompatibleShutdownScript"));
        CHECK(LDKAPIError_IncompatibleShutdownScript_class != NULL);
@@ -6285,8 +6333,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
                        jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
                        return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth, err_conv);
                }
-               case LDKAPIError_MonitorUpdateFailed: {
-                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateFailed_class, LDKAPIError_MonitorUpdateFailed_meth);
+               case LDKAPIError_MonitorUpdateInProgress: {
+                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateInProgress_class, LDKAPIError_MonitorUpdateInProgress_meth);
                }
                case LDKAPIError_IncompatibleShutdownScript: {
                        LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
@@ -6680,16 +6728,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwar
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwardingInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6708,16 +6754,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpart
 }
 
 static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpartyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6736,16 +6780,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDeco
 }
 
 static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6764,16 +6806,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsD
 }
 
 static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6809,7 +6849,7 @@ static void LDKWatch_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -6828,21 +6868,18 @@ LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void*
        monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to watch_channel in LDKWatch from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -6861,15 +6898,12 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void
        update_ref = tag_ptr(update_var.inner, update_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_channel in LDKWatch from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
@@ -6923,9 +6957,9 @@ static inline LDKWatch LDKWatch_init (JNIEnv *env, jclass clz, jobject o) {
        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");
+       calls->watch_channel_meth = (*env)->GetMethodID(env, c, "watch_channel", "(JJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->watch_channel_meth != NULL);
-       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)J");
+       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        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);
@@ -6944,7 +6978,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new(JNIEnv *env,
        *res_ptr = LDKWatch_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-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) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t monitor) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -6958,12 +6992,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEn
        monitor_conv.is_owned = ptr_is_owned(monitor);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
        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 tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+       return 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) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t update) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -6977,9 +7010,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIE
        update_conv.is_owned = ptr_is_owned(update);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
        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 tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+       return ret_conv;
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -7090,6 +7122,7 @@ typedef struct LDKKeysInterface_JCalls {
        JavaVM *vm;
        jweak o;
        jmethodID get_node_secret_meth;
+       jmethodID get_node_id_meth;
        jmethodID ecdh_meth;
        jmethodID get_destination_script_meth;
        jmethodID get_shutdown_scriptpubkey_meth;
@@ -7142,6 +7175,32 @@ LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* thi
        }
        return ret_conv;
 }
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jclass recipient_conv = LDKRecipient_to_java(env, recipient);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_node_id_meth, recipient_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to get_node_id in LDKKeysInterface from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
 LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        JNIEnv *env;
@@ -7378,6 +7437,8 @@ static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, j
        calls->o = (*env)->NewWeakGlobalRef(env, o);
        calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "(Lorg/ldk/enums/Recipient;)J");
        CHECK(calls->get_node_secret_meth != NULL);
+       calls->get_node_id_meth = (*env)->GetMethodID(env, c, "get_node_id", "(Lorg/ldk/enums/Recipient;)J");
+       CHECK(calls->get_node_id_meth != NULL);
        calls->ecdh_meth = (*env)->GetMethodID(env, c, "ecdh", "(Lorg/ldk/enums/Recipient;[BJ)J");
        CHECK(calls->ecdh_meth != NULL);
        calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()[B");
@@ -7398,6 +7459,7 @@ static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, j
        LDKKeysInterface ret = {
                .this_arg = (void*) calls,
                .get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+               .get_node_id = get_node_id_LDKKeysInterface_jcall,
                .ecdh = ecdh_LDKKeysInterface_jcall,
                .get_destination_script = get_destination_script_LDKKeysInterface_jcall,
                .get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
@@ -7425,6 +7487,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1s
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, jclass recipient) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+       LDKRecipient recipient_conv = LDKRecipient_from_java(env, recipient);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1ecdh(JNIEnv *env, jclass clz, int64_t this_arg, jclass recipient, int8_tArray other_key, int64_t tweak) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -7646,16 +7718,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7674,16 +7744,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecod
 }
 
 static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7702,16 +7770,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7913,16 +7979,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDeco
 }
 
 static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8009,16 +8073,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecod
 }
 
 static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8540,16 +8602,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda
 }
 
 static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8595,16 +8655,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEv
 }
 
 static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEventZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8623,16 +8681,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8892,16 +8948,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8932,6 +8986,179 @@ static inline LDKCVec_C2Tuple_PublicKeyTypeZZ CVec_C2Tuple_PublicKeyTypeZZ_clone
        }
        return ret;
 }
+typedef struct LDKCustomOnionMessageContents_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID tlv_type_meth;
+       jmethodID write_meth;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_t ret = (*env)->CallLongMethod(env, obj, j_calls->tlv_type_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to tlv_type in LDKCustomOnionMessageContents from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret;
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->write_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to write in LDKCustomOnionMessageContents from rust threw an exception.");
+       }
+       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);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->tlv_type_meth = (*env)->GetMethodID(env, c, "tlv_type", "()J");
+       CHECK(calls->tlv_type_meth != NULL);
+       calls->write_meth = (*env)->GetMethodID(env, c, "write", "()[B");
+       CHECK(calls->write_meth != NULL);
+
+       LDKCustomOnionMessageContents ret = {
+               .this_arg = (void*) calls,
+               .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+               .write = write_LDKCustomOnionMessageContents_jcall,
+               .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+               .free = LDKCustomOnionMessageContents_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageContents_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *res_ptr = LDKCustomOnionMessageContents_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1tlv_1type(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1write(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       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;
+}
+
+static jclass LDKCOption_CustomOnionMessageContentsZ_Some_class = NULL;
+static jmethodID LDKCOption_CustomOnionMessageContentsZ_Some_meth = NULL;
+static jclass LDKCOption_CustomOnionMessageContentsZ_None_class = NULL;
+static jmethodID LDKCOption_CustomOnionMessageContentsZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1CustomOnionMessageContentsZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_CustomOnionMessageContentsZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_CustomOnionMessageContentsZ$Some"));
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_Some_class != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_CustomOnionMessageContentsZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_Some_meth != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_CustomOnionMessageContentsZ$None"));
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_None_class != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_None_meth = (*env)->GetMethodID(env, LDKCOption_CustomOnionMessageContentsZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CustomOnionMessageContentsZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_CustomOnionMessageContentsZ_Some: {
+                       LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+                       *some_ret = CustomOnionMessageContents_clone(&obj->some);
+                       return (*env)->NewObject(env, LDKCOption_CustomOnionMessageContentsZ_Some_class, LDKCOption_CustomOnionMessageContentsZ_Some_meth, tag_ptr(some_ret, true));
+               }
+               case LDKCOption_CustomOnionMessageContentsZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_CustomOnionMessageContentsZ_None_class, LDKCOption_CustomOnionMessageContentsZ_None_meth);
+               }
+               default: abort();
+       }
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static jclass LDKCOption_NetAddressZ_Some_class = NULL;
 static jmethodID LDKCOption_NetAddressZ_Some_meth = NULL;
 static jclass LDKCOption_NetAddressZ_None_class = NULL;
@@ -9043,6 +9270,8 @@ static jclass LDKSendError_TooFewBlindedHops_class = NULL;
 static jmethodID LDKSendError_TooFewBlindedHops_meth = NULL;
 static jclass LDKSendError_InvalidFirstHop_class = NULL;
 static jmethodID LDKSendError_InvalidFirstHop_meth = NULL;
+static jclass LDKSendError_InvalidMessage_class = NULL;
+static jmethodID LDKSendError_InvalidMessage_meth = NULL;
 static jclass LDKSendError_BufferFull_class = NULL;
 static jmethodID LDKSendError_BufferFull_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
@@ -9066,6 +9295,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv
        CHECK(LDKSendError_InvalidFirstHop_class != NULL);
        LDKSendError_InvalidFirstHop_meth = (*env)->GetMethodID(env, LDKSendError_InvalidFirstHop_class, "<init>", "()V");
        CHECK(LDKSendError_InvalidFirstHop_meth != NULL);
+       LDKSendError_InvalidMessage_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$InvalidMessage"));
+       CHECK(LDKSendError_InvalidMessage_class != NULL);
+       LDKSendError_InvalidMessage_meth = (*env)->GetMethodID(env, LDKSendError_InvalidMessage_class, "<init>", "()V");
+       CHECK(LDKSendError_InvalidMessage_meth != NULL);
        LDKSendError_BufferFull_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BufferFull"));
        CHECK(LDKSendError_BufferFull_class != NULL);
@@ -9088,6 +9322,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt
                case LDKSendError_InvalidFirstHop: {
                        return (*env)->NewObject(env, LDKSendError_InvalidFirstHop_class, LDKSendError_InvalidFirstHop_meth);
                }
+               case LDKSendError_InvalidMessage: {
+                       return (*env)->NewObject(env, LDKSendError_InvalidMessage_class, LDKSendError_InvalidMessage_meth);
+               }
                case LDKSendError_BufferFull: {
                        return (*env)->NewObject(env, LDKSendError_BufferFull_class, LDKSendError_BufferFull_meth);
                }
@@ -9135,10 +9372,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKGraphSyncError_1ref_1fro
        LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKGraphSyncError_DecodeError: {
-                       LDKDecodeError decode_error_var = obj->decode_error;
-                       int64_t decode_error_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
-                       decode_error_ref = tag_ptr(decode_error_var.inner, false);
+                       int64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
                        return (*env)->NewObject(env, LDKGraphSyncError_DecodeError_class, LDKGraphSyncError_DecodeError_meth, decode_error_ref);
                }
                case LDKGraphSyncError_LightningError: {
@@ -9186,16 +9420,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9242,16 +9474,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecod
 }
 
 static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9270,16 +9500,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignat
 }
 
 static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9298,16 +9526,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablish
 }
 
 static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9326,16 +9552,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecod
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9354,16 +9578,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRa
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9382,16 +9604,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDe
 }
 
 static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9410,16 +9630,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDeco
 }
 
 static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9438,16 +9656,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecod
 }
 
 static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9466,16 +9682,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecode
 }
 
 static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9494,16 +9708,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9522,16 +9734,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeE
 }
 
 static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9550,16 +9760,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecode
 }
 
 static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9578,16 +9786,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9606,16 +9812,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDeco
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9634,16 +9838,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalforme
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9662,16 +9864,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9690,16 +9890,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCD
 }
 
 static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9718,16 +9916,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecod
 }
 
 static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9746,16 +9942,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecode
 }
 
 static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9774,16 +9968,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9802,16 +9994,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9830,16 +10020,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnn
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9858,16 +10046,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncemen
 }
 
 static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9886,16 +10072,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpd
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9914,16 +10098,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecod
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9942,16 +10124,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecode
 }
 
 static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9970,16 +10150,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDeco
 }
 
 static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9998,16 +10176,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnoun
 }
 
 static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10026,16 +10202,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDe
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10054,16 +10228,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelI
 }
 
 static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10082,16 +10254,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelI
 }
 
 static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10110,16 +10280,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeD
 }
 
 static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10138,16 +10306,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeD
 }
 
 static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10166,16 +10332,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFil
 }
 
 static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -11507,7 +11671,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -11531,21 +11695,18 @@ LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(con
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -11574,15 +11735,12 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcal
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
@@ -11599,9 +11757,9 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        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", "(JJJ)J");
+       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->persist_new_channel_meth != NULL);
-       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)J");
+       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->update_persisted_channel_meth != NULL);
 
        LDKPersist ret = {
@@ -11617,7 +11775,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env
        *res_ptr = LDKPersist_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -11636,12 +11794,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chan
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       return 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 channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -11665,9 +11822,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
 typedef struct LDKChannelMessageHandler_JCalls {
@@ -12156,7 +12312,7 @@ void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKP
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -12174,14 +12330,19 @@ void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPubl
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKChannelMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -12360,7 +12521,7 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
        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");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        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);
@@ -12662,7 +12823,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1d
        (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
 
-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) {
+JNIEXPORT int64_t 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) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
@@ -12674,7 +12835,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1c
        msg_conv.is_owned = ptr_is_owned(msg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
        msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 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) {
@@ -12925,7 +13088,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co
        }
        return ret_conv;
 }
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -12943,14 +13106,19 @@ void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPubl
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKRoutingMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
@@ -13150,7 +13318,7 @@ static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *en
        CHECK(calls->get_next_channel_announcement_meth != NULL);
        calls->get_next_node_announcement_meth = (*env)->GetMethodID(env, c, "get_next_node_announcement", "([B)J");
        CHECK(calls->get_next_node_announcement_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        CHECK(calls->peer_connected_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);
@@ -13260,7 +13428,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
@@ -13272,7 +13440,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1c
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 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) {
@@ -13423,7 +13593,7 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -13441,14 +13611,19 @@ void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublic
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKOnionMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
@@ -13539,7 +13714,7 @@ static inline LDKOnionMessageHandler LDKOnionMessageHandler_init (JNIEnv *env, j
        calls->o = (*env)->NewWeakGlobalRef(env, o);
        calls->handle_onion_message_meth = (*env)->GetMethodID(env, c, "handle_onion_message", "([BJ)V");
        CHECK(calls->handle_onion_message_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        CHECK(calls->peer_connected_meth != NULL);
        calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
        CHECK(calls->peer_disconnected_meth != NULL);
@@ -13585,7 +13760,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1handle_1o
        (this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
@@ -13597,7 +13772,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1con
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
@@ -13890,6 +14067,137 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1
        return ret_arr;
 }
 
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID handle_custom_message_meth;
+       jmethodID read_custom_message_meth;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *msg_ret = msg;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->handle_custom_message_meth, tag_ptr(msg_ret, true));
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to handle_custom_message in LDKCustomOnionMessageHandler from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       int64_t message_type_conv = message_type;
+       LDKu8slice buffer_var = buffer;
+       int8_tArray buffer_arr = (*env)->NewByteArray(env, buffer_var.datalen);
+       (*env)->SetByteArrayRegion(env, buffer_arr, 0, buffer_var.datalen, buffer_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->read_custom_message_meth, message_type_conv, buffer_arr);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to read_custom_message in LDKCustomOnionMessageHandler from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->handle_custom_message_meth = (*env)->GetMethodID(env, c, "handle_custom_message", "(J)V");
+       CHECK(calls->handle_custom_message_meth != NULL);
+       calls->read_custom_message_meth = (*env)->GetMethodID(env, c, "read_custom_message", "(J[B)J");
+       CHECK(calls->read_custom_message_meth != NULL);
+
+       LDKCustomOnionMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .free = LDKCustomOnionMessageHandler_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageHandler_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *res_ptr = LDKCustomOnionMessageHandler_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1handle_1custom_1message(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
+       (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1read_1custom_1message(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message_type, int8_tArray buffer) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       LDKu8slice buffer_ref;
+       buffer_ref.datalen = (*env)->GetArrayLength(env, buffer);
+       buffer_ref.data = (*env)->GetByteArrayElements (env, buffer, NULL);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+       (*env)->ReleaseByteArrayElements(env, buffer, (int8_t*)buffer_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 typedef struct LDKSocketDescriptor_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -15192,11 +15500,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
        *ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15230,11 +15537,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeEr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
        *ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15312,11 +15618,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommit
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommitmentSecretsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
        *ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15465,11 +15770,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
        *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15520,11 +15824,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
        *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15669,11 +15972,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommit
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
        *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15739,11 +16041,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChanne
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15794,11 +16095,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransaction
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15866,11 +16166,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15921,11 +16220,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTra
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16009,11 +16307,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransact
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16155,11 +16452,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
        *ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16341,11 +16637,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErro
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
        *ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16446,11 +16741,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
        *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16501,11 +16795,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
        *ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16635,11 +16928,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
        *ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16710,11 +17002,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
        *ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16765,11 +17056,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
        *ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16894,11 +17184,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
        *ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16995,11 +17284,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureRe
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureReasonZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
        *ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17096,11 +17384,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDesti
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDestinationZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
        *ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17264,11 +17551,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
        *ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17452,52 +17738,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxidZ_1free(JNIEnv *env,
        CVec_TxidZ_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();
-       return tag_ptr(ret_conv, true);
-}
-
-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 tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
-       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*)untag_ptr(orig);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 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);
@@ -17607,11 +17847,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorer
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
        *ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17763,11 +18002,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
        *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17800,11 +18038,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
        *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17855,11 +18092,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDec
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17910,11 +18146,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
        *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17965,11 +18200,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
        *ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18020,11 +18254,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18075,11 +18308,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
        *ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18129,11 +18361,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUp
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUpdateZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
        *ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18409,11 +18640,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18464,11 +18694,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18519,11 +18748,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
        *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18594,11 +18822,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementIn
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18649,11 +18876,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
        *ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18704,11 +18930,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
        *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18760,11 +18985,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18856,11 +19080,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutp
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18911,11 +19134,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutpu
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18965,11 +19187,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19307,6 +19528,54 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1cl
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_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_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ScalarZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -19396,11 +19665,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
        *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19601,11 +19869,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
        *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20536,11 +20803,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwar
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwardingInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
        *ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20591,11 +20857,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpart
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpartyDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
        *ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20646,11 +20911,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
        *ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20701,11 +20965,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
        *ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20799,11 +21062,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20836,11 +21098,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
        *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20891,11 +21152,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
        *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20995,11 +21255,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
        *ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21103,11 +21362,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecod
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
        *ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21712,11 +21970,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21813,11 +22070,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEv
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEventZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
        *ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21868,11 +22124,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeEr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
        *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22281,11 +22536,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22387,6 +22641,109 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyTypeZZ
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+       if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+       o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetAddressZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -22661,11 +23018,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeEr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
        *ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22796,11 +23152,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
        *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22851,11 +23206,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignat
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
        *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22906,11 +23260,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablish
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
        *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22961,11 +23314,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23016,11 +23368,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRa
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23071,11 +23422,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDe
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
        *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23126,11 +23476,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
        *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23181,11 +23530,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
        *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23236,11 +23584,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
        *ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23291,11 +23638,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
        *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23346,11 +23692,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
        *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23401,11 +23746,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
        *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23456,11 +23800,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
        *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23511,11 +23854,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23566,11 +23908,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalforme
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23621,11 +23962,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
        *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23676,11 +24016,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23731,11 +24070,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23786,11 +24124,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
        *ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23841,11 +24178,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
        *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23896,11 +24232,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
        *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23951,11 +24286,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnn
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24006,11 +24340,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncemen
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24061,11 +24394,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpd
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24116,11 +24448,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24171,11 +24502,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
        *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24226,11 +24556,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
        *ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24281,11 +24610,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnoun
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24336,11 +24664,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDe
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24391,11 +24718,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelI
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
        *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24446,11 +24772,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelI
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
        *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24501,11 +24826,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
        *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24556,11 +24880,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
        *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24611,11 +24934,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFil
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
        *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24969,6 +25291,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1outdated_1ch
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+       LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+       jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosureReason_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
@@ -25047,6 +25376,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1pa
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+       LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+       jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
@@ -25866,9 +26202,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1channel_1unavaila
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1failed(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1in_1progress(JNIEnv *env, jclass clz) {
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = APIError_monitor_update_failed();
+       *ret_copy = APIError_monitor_update_in_progress();
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -25885,6 +26221,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1incompatible_1shu
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_APIError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+       LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+       jboolean ret_conv = APIError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BigSize_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBigSize this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -25958,6 +26301,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Hostname_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Hostname_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHostname a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHostname b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Hostname_1len(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKHostname this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -26870,6 +27228,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelConfig a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelConfig b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv *env, jclass clz) {
        LDKChannelConfig ret_var = ChannelConfig_default();
        int64_t ret_ref = 0;
@@ -27146,6 +27519,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBestBlock b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1genesis(JNIEnv *env, jclass clz, jclass network) {
        LDKNetwork network_conv = LDKNetwork_from_java(env, network);
        LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
@@ -27230,19 +27618,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1free(JNIEnv *env, jcl
        Confirm_free(this_ptr_conv);
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_clone(orig_conv));
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1completed(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_completed());
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1temporary_1failure(JNIEnv *env, jclass clz) {
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_temporary_failure());
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1in_1progress(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_in_progress());
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1permanent_1failure(JNIEnv *env, jclass clz) {
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_permanent_failure());
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1permanent_1failure(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_permanent_failure());
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+       LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+       jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
        return ret_conv;
 }
 
@@ -27397,6 +27797,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKWatchedOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWatchedOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKWatchedOutput o_conv;
        o_conv.inner = untag_ptr(o);
@@ -27862,14 +28277,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1commitment_1t
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -27886,6 +28301,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1faile
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+       LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+       jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
@@ -27943,6 +28365,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1clone(JNIEnv *e
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -28929,6 +29366,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDelayedPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDelayedPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -29103,6 +29555,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescript
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKStaticPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKStaticPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -29195,6 +29662,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+       LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+       jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
@@ -31860,6 +32334,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1Channel
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1node_1features(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = provided_node_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1channel_1features(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = provided_channel_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = provided_init_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CounterpartyForwardingInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKCounterpartyForwardingInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -32272,44 +32770,92 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1from_1hash(JNIEnv *
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKDecodeError this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       DecodeError_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       DecodeError_free(this_ptr_conv);
 }
 
 static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
-       LDKDecodeError ret_var = DecodeError_clone(arg);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKDecodeError arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+       LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+       int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDecodeError orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1version(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_version();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1required_1feature(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_required_feature();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1invalid_1value(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_invalid_value();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1short_1read(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_short_read();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1bad_1length_1descriptor(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_bad_length_descriptor();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1io(JNIEnv *env, jclass clz, jclass a) {
+       LDKIOError a_conv = LDKIOError_from_java(env, a);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_io(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unsupported_compression();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DecodeError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+       LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+       jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInit this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32416,6 +32962,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Init_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInit a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInit b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKErrorMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32511,6 +33072,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKErrorMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKErrorMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKWarningMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32606,6 +33182,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WarningMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKWarningMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWarningMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPing this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32690,6 +33281,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Ping_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPing a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPing b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPong this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32755,6 +33361,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPong a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPong b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOpenChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33194,6 +33815,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOpenChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOpenChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKAcceptChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33553,6 +34189,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAcceptChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAcceptChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFundingCreated this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33696,6 +34347,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingCreated_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKFundingCreated a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingCreated b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFundingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33794,6 +34460,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKFundingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelReady this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33921,6 +34602,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReady_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelReady a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReady b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKShutdown this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34022,6 +34718,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Shutdown_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShutdown a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdown b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKClosingSignedFeeRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34106,6 +34817,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingSignedFeeRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSignedFeeRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKClosingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34255,6 +34981,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateAddHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34396,6 +35137,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateAddHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateAddHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOnionMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34457,6 +35213,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessage_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOnionMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOnionMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFulfillHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34574,6 +35345,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFulfillHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFulfillHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFailHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34654,6 +35440,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFailHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFailMalformedHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34753,6 +35554,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1cl
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFailMalformedHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailMalformedHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKCommitmentSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34906,6 +35722,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommitmentSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRevokeAndACK this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35030,6 +35861,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKRevokeAndACK a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKRevokeAndACK b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFee this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35121,6 +35967,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFee_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFee a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFee b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKDataLossProtect this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35219,6 +36080,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIE
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDataLossProtect a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDataLossProtect b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelReestablish this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35318,6 +36194,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelReestablish a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReestablish b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKAnnouncementSignatures this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35461,6 +36352,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clo
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAnnouncementSignatures a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAnnouncementSignatures b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -35542,6 +36448,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetAddress_1hostname(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetAddress_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+       LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+       jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetAddress_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
@@ -35760,6 +36673,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1c
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKNodeAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35864,6 +36792,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36063,6 +37006,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36245,6 +37203,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36499,6 +37472,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36603,6 +37591,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKQueryChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36713,6 +37716,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKQueryChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReplyChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36894,6 +37912,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKReplyChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKQueryShortChannelIds this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37018,6 +38051,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKQueryShortChannelIds a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryShortChannelIds b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReplyShortChannelIdsEnd this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37109,6 +38157,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1cl
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKReplyShortChannelIdsEnd a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyShortChannelIdsEnd b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKGossipTimestampFilter this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37219,6 +38282,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKGossipTimestampFilter a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKGossipTimestampFilter b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -37775,6 +38853,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommitmentUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -38663,6 +39756,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1CustomOnionMessageHandler(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1CustomMessageReader(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKIgnoringMessageHandler this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38945,7 +40049,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv *env,
        PeerManager_free(this_obj_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *env, jclass clz, int64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, int64_t logger, int64_t custom_message_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *env, jclass clz, int64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, int64_t logger, int64_t custom_message_handler) {
        LDKMessageHandler message_handler_conv;
        message_handler_conv.inner = untag_ptr(message_handler);
        message_handler_conv.is_owned = ptr_is_owned(message_handler);
@@ -39500,6 +40604,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTxCreationKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTxCreationKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
        LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
        int64_t ret_ref = 0;
@@ -39729,6 +40848,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelPublicKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelPublicKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -39964,6 +41098,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clo
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCOutputInCommitment a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCOutputInCommitment b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40880,6 +42029,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1hash(JN
        return ret_conv;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingTransaction a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingTransaction b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1new(JNIEnv *env, jclass clz, int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, int64_t funding_outpoint) {
        LDKCVec_u8Z to_holder_script_ref;
        to_holder_script_ref.datalen = (*env)->GetArrayLength(env, to_holder_script);
@@ -41520,22 +42684,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1free(JNIE
        ChannelTypeFeatures_free(this_obj_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known_1channel_1features(JNIEnv *env, jclass clz) {
-       LDKInitFeatures ret_var = InitFeatures_known_channel_features();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known_1channel_1features(JNIEnv *env, jclass clz) {
-       LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv *env, jclass clz) {
        LDKInitFeatures ret_var = InitFeatures_empty();
        int64_t ret_ref = 0;
@@ -41544,14 +42692,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKInitFeatures ret_var = InitFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKInitFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41570,14 +42710,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKNodeFeatures ret_var = NodeFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNodeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41596,14 +42728,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKChannelFeatures ret_var = ChannelFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41622,14 +42746,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1empty(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKInvoiceFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41648,14 +42764,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1empty(
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelTypeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -43101,6 +44209,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShutdownScript a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdownScript b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvalidShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInvalidShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -43481,6 +44604,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1node_1failur
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+       LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+       jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
@@ -43797,6 +44927,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelUpdateInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdateInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelUpdateInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44045,6 +45190,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1directional_1info(JNIEnv *env, jclass clz, int64_t this_arg, int8_t channel_flags) {
        LDKChannelInfo this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -44621,6 +45781,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAnnouncementInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncementInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44716,6 +45891,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAlias_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAlias_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAlias a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAlias b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAlias_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAlias obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44901,6 +46091,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45123,34 +46328,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1channel_1failed(
        NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed_1permanent(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray node_id) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKPublicKey _node_id_ref;
-       CHECK((*env)->GetArrayLength(env, _node_id) == 33);
-       (*env)->GetByteArrayRegion(env, _node_id, 0, 33, _node_id_ref.compressed_form);
-       NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels(&this_arg_conv);
+       NetworkGraph_remove_stale_channels_and_tracking(&this_arg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1with_1time(JNIEnv *env, jclass clz, int64_t this_arg, int64_t current_time_unix) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking_1with_1time(JNIEnv *env, jclass clz, int64_t this_arg, int64_t current_time_unix) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+       NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
@@ -47195,6 +48400,63 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters
        ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1amount_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1amount_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1no_1updates_1half_1life(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1no_1updates_1half_1life(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1anti_1probing_1penalty_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKProbabilisticScoringParameters this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47646,6 +48908,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1first_1
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1message(JNIEnv *env, jclass clz) {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_invalid_message();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full(JNIEnv *env, jclass clz) {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_buffer_full();
@@ -47653,7 +48922,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full(JNI
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t keys_manager, int64_t logger) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+       LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+       jboolean ret_conv = SendError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t keys_manager, int64_t logger, int64_t custom_handler) {
        void* keys_manager_ptr = untag_ptr(keys_manager);
        CHECK_ACCESS(keys_manager_ptr);
        LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
@@ -47668,14 +48953,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+       void* custom_handler_ptr = untag_ptr(custom_handler);
+       CHECK_ACCESS(custom_handler_ptr);
+       LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+       if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+       }
+       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1onion_1message(JNIEnv *env, jclass clz, int64_t this_arg, jobjectArray intermediate_nodes, int64_t destination, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1custom_1onion_1message(JNIEnv *env, jclass clz, int64_t this_arg, jobjectArray intermediate_nodes, int64_t destination, int64_t msg, int64_t reply_path) {
        LDKOnionMessenger this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -47698,13 +48990,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1onion
        CHECK_ACCESS(destination_ptr);
        LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
        // WARNING: we may need a move here but no clone is available for LDKDestination
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
        LDKBlindedRoute reply_path_conv;
        reply_path_conv.inner = untag_ptr(reply_path);
        reply_path_conv.is_owned = ptr_is_owned(reply_path);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv.is_owned = false;
        LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
-       *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+       *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -47730,6 +49029,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1as_1OnionMe
        return tag_ptr(ret_ret, true);
 }
 
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(arg);
+       return tag_ptr(ret_ret, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       void* arg_ptr = untag_ptr(arg);
+       if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+       LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+       int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       void* orig_ptr = untag_ptr(orig);
+       if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+       LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageContents_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FilesystemPersister_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFilesystemPersister this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -48071,6 +49401,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ParseError_1skip(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+       LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+       jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -48119,6 +49456,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1seman
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+       LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+       jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInvoice this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -50208,7 +51552,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InFlightHtlcs_1read(JNIEnv
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t keys_manager, jclass network) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t keys_manager, int64_t logger, jclass network) {
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
        LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
@@ -50241,13 +51585,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JN
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_phantom_invoice(amt_msat_conv, payment_hash_ref, description_conv, invoice_expiry_delta_secs, phantom_route_hints_constr, keys_manager_conv, network_conv);
+       *ret_conv = create_phantom_invoice(amt_msat_conv, payment_hash_ref, description_conv, invoice_expiry_delta_secs, phantom_route_hints_constr, keys_manager_conv, logger_conv, network_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t description_hash, int64_tArray phantom_route_hints, int64_t keys_manager, jclass network) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t description_hash, int64_tArray phantom_route_hints, int64_t keys_manager, int64_t logger, jclass network) {
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
        LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
@@ -50284,13 +51635,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1w
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_phantom_invoice_with_description_hash(amt_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, description_hash_conv, phantom_route_hints_constr, keys_manager_conv, network_conv);
+       *ret_conv = create_phantom_invoice_with_description_hash(amt_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, description_hash_conv, phantom_route_hints_constr, keys_manager_conv, logger_conv, network_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50303,6 +51661,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50310,11 +51675,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = java_to_owned_str(env, description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50327,6 +51692,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50338,11 +51710,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50355,6 +51727,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50366,11 +51745,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50383,6 +51762,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50390,7 +51776,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = java_to_owned_str(env, description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
@@ -50552,15 +51938,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1sync_1network_1graph_1with_1file_1path(JNIEnv *env, jclass clz, int64_t this_arg, jstring sync_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray update_data) {
        LDKRapidGossipSync this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKStr sync_path_conv = java_to_owned_str(env, sync_path);
+       LDKu8slice update_data_ref;
+       update_data_ref.datalen = (*env)->GetArrayLength(env, update_data);
+       update_data_ref.data = (*env)->GetByteArrayElements (env, update_data, NULL);
        LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
-       *ret_conv = RapidGossipSync_sync_network_graph_with_file_path(&this_arg_conv, sync_path_conv);
+       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
+       (*env)->ReleaseByteArrayElements(env, update_data, (int8_t*)update_data_ref.data, 0);
        return tag_ptr(ret_conv, true);
 }
 
@@ -50604,11 +51993,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1clone(JNIEn
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1decode_1error(JNIEnv *env, jclass clz, int64_t a) {
-       LDKDecodeError a_conv;
-       a_conv.inner = untag_ptr(a);
-       a_conv.is_owned = ptr_is_owned(a);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
-       a_conv = DecodeError_clone(&a_conv);
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+       a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
        LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
        *ret_copy = GraphSyncError_decode_error(a_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
@@ -50627,18 +52015,3 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1lightning_1
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray update_data) {
-       LDKRapidGossipSync this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       LDKu8slice update_data_ref;
-       update_data_ref.datalen = (*env)->GetArrayLength(env, update_data);
-       update_data_ref.data = (*env)->GetByteArrayElements (env, update_data, NULL);
-       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
-       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
-       (*env)->ReleaseByteArrayElements(env, update_data, (int8_t*)update_data_ref.data, 0);
-       return tag_ptr(ret_conv, true);
-}
-
index 313b459ad84ab8264f6dbb11c2fec09abf640147..2e829e6b95943ae1498edc071508c0d50cccacda 100644 (file)
@@ -277,36 +277,42 @@ static inline jclass LDKCOption_NoneZ_to_java(JNIEnv *env, LDKCOption_NoneZ val)
        }
 }
 
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_java(JNIEnv *env, jclass clz) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to ChannelMonitorUpdateErr.ordinal() from rust threw an exception.");
+               (*env)->FatalError(env, "A call to ChannelMonitorUpdateStatus.ordinal() from rust threw an exception.");
        }
        switch (ord) {
-               case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
-               case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+               case 0: return LDKChannelMonitorUpdateStatus_Completed;
+               case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+               case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
        }
-       (*env)->FatalError(env, "A call to ChannelMonitorUpdateErr.ordinal() from rust returned an invalid value.");
+       (*env)->FatalError(env, "A call to ChannelMonitorUpdateStatus.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
 }
-static jclass ChannelMonitorUpdateErr_class = NULL;
-static jfieldID ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure = NULL;
-static jfieldID ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateErr_init (JNIEnv *env, jclass clz) {
-       ChannelMonitorUpdateErr_class = (*env)->NewGlobalRef(env, clz);
-       CHECK(ChannelMonitorUpdateErr_class != NULL);
-       ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateErr_class, "LDKChannelMonitorUpdateErr_TemporaryFailure", "Lorg/ldk/enums/ChannelMonitorUpdateErr;");
-       CHECK(ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure != NULL);
-       ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateErr_class, "LDKChannelMonitorUpdateErr_PermanentFailure", "Lorg/ldk/enums/ChannelMonitorUpdateErr;");
-       CHECK(ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure != NULL);
-}
-static inline jclass LDKChannelMonitorUpdateErr_to_java(JNIEnv *env, LDKChannelMonitorUpdateErr val) {
+static jclass ChannelMonitorUpdateStatus_class = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress = NULL;
+static jfieldID ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateStatus_init (JNIEnv *env, jclass clz) {
+       ChannelMonitorUpdateStatus_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(ChannelMonitorUpdateStatus_class != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_Completed", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_InProgress", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress != NULL);
+       ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure = (*env)->GetStaticFieldID(env, ChannelMonitorUpdateStatus_class, "LDKChannelMonitorUpdateStatus_PermanentFailure", "Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
+       CHECK(ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure != NULL);
+}
+static inline jclass LDKChannelMonitorUpdateStatus_to_java(JNIEnv *env, LDKChannelMonitorUpdateStatus val) {
        switch (val) {
-               case LDKChannelMonitorUpdateErr_TemporaryFailure:
-                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateErr_class, ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_TemporaryFailure);
-               case LDKChannelMonitorUpdateErr_PermanentFailure:
-                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateErr_class, ChannelMonitorUpdateErr_LDKChannelMonitorUpdateErr_PermanentFailure);
+               case LDKChannelMonitorUpdateStatus_Completed:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_Completed);
+               case LDKChannelMonitorUpdateStatus_InProgress:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_InProgress);
+               case LDKChannelMonitorUpdateStatus_PermanentFailure:
+                       return (*env)->GetStaticObjectField(env, ChannelMonitorUpdateStatus_class, ChannelMonitorUpdateStatus_LDKChannelMonitorUpdateStatus_PermanentFailure);
                default: abort();
        }
 }
@@ -1083,6 +1089,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteNoneZ_1ge
        CResult_BlindedRouteNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKDecodeError_UnknownVersion_class = NULL;
+static jmethodID LDKDecodeError_UnknownVersion_meth = NULL;
+static jclass LDKDecodeError_UnknownRequiredFeature_class = NULL;
+static jmethodID LDKDecodeError_UnknownRequiredFeature_meth = NULL;
+static jclass LDKDecodeError_InvalidValue_class = NULL;
+static jmethodID LDKDecodeError_InvalidValue_meth = NULL;
+static jclass LDKDecodeError_ShortRead_class = NULL;
+static jmethodID LDKDecodeError_ShortRead_meth = NULL;
+static jclass LDKDecodeError_BadLengthDescriptor_class = NULL;
+static jmethodID LDKDecodeError_BadLengthDescriptor_meth = NULL;
+static jclass LDKDecodeError_Io_class = NULL;
+static jmethodID LDKDecodeError_Io_meth = NULL;
+static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
+static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
+       LDKDecodeError_UnknownVersion_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
+       CHECK(LDKDecodeError_UnknownVersion_class != NULL);
+       LDKDecodeError_UnknownVersion_meth = (*env)->GetMethodID(env, LDKDecodeError_UnknownVersion_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnknownVersion_meth != NULL);
+       LDKDecodeError_UnknownRequiredFeature_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownRequiredFeature"));
+       CHECK(LDKDecodeError_UnknownRequiredFeature_class != NULL);
+       LDKDecodeError_UnknownRequiredFeature_meth = (*env)->GetMethodID(env, LDKDecodeError_UnknownRequiredFeature_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnknownRequiredFeature_meth != NULL);
+       LDKDecodeError_InvalidValue_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$InvalidValue"));
+       CHECK(LDKDecodeError_InvalidValue_class != NULL);
+       LDKDecodeError_InvalidValue_meth = (*env)->GetMethodID(env, LDKDecodeError_InvalidValue_class, "<init>", "()V");
+       CHECK(LDKDecodeError_InvalidValue_meth != NULL);
+       LDKDecodeError_ShortRead_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$ShortRead"));
+       CHECK(LDKDecodeError_ShortRead_class != NULL);
+       LDKDecodeError_ShortRead_meth = (*env)->GetMethodID(env, LDKDecodeError_ShortRead_class, "<init>", "()V");
+       CHECK(LDKDecodeError_ShortRead_meth != NULL);
+       LDKDecodeError_BadLengthDescriptor_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$BadLengthDescriptor"));
+       CHECK(LDKDecodeError_BadLengthDescriptor_class != NULL);
+       LDKDecodeError_BadLengthDescriptor_meth = (*env)->GetMethodID(env, LDKDecodeError_BadLengthDescriptor_class, "<init>", "()V");
+       CHECK(LDKDecodeError_BadLengthDescriptor_meth != NULL);
+       LDKDecodeError_Io_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$Io"));
+       CHECK(LDKDecodeError_Io_class != NULL);
+       LDKDecodeError_Io_meth = (*env)->GetMethodID(env, LDKDecodeError_Io_class, "<init>", "(Lorg/ldk/enums/IOError;)V");
+       CHECK(LDKDecodeError_Io_meth != NULL);
+       LDKDecodeError_UnsupportedCompression_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnsupportedCompression"));
+       CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
+       LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
+       CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKDecodeError_UnknownVersion: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnknownVersion_class, LDKDecodeError_UnknownVersion_meth);
+               }
+               case LDKDecodeError_UnknownRequiredFeature: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnknownRequiredFeature_class, LDKDecodeError_UnknownRequiredFeature_meth);
+               }
+               case LDKDecodeError_InvalidValue: {
+                       return (*env)->NewObject(env, LDKDecodeError_InvalidValue_class, LDKDecodeError_InvalidValue_meth);
+               }
+               case LDKDecodeError_ShortRead: {
+                       return (*env)->NewObject(env, LDKDecodeError_ShortRead_class, LDKDecodeError_ShortRead_meth);
+               }
+               case LDKDecodeError_BadLengthDescriptor: {
+                       return (*env)->NewObject(env, LDKDecodeError_BadLengthDescriptor_class, LDKDecodeError_BadLengthDescriptor_meth);
+               }
+               case LDKDecodeError_Io: {
+                       jclass io_conv = LDKIOError_to_java(env, obj->io);
+                       return (*env)->NewObject(env, LDKDecodeError_Io_class, LDKDecodeError_Io_meth, io_conv);
+               }
+               case LDKDecodeError_UnsupportedCompression: {
+                       return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
+               }
+               default: abort();
+       }
+}
 static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
        LDKBlindedRoute ret = *owner->contents.result;
        ret.is_owned = false;
@@ -1098,16 +1183,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecode
 }
 
 static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1126,16 +1209,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1172,16 +1253,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommit
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommitmentSecretsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1242,16 +1321,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDeco
 }
 
 static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1270,16 +1347,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysD
 }
 
 static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1351,16 +1426,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommit
 }
 
 static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1379,16 +1452,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChanne
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1407,16 +1478,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransaction
 }
 
 static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1435,16 +1504,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTr
 }
 
 static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1463,16 +1530,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTra
 }
 
 static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1514,16 +1579,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransact
 }
 
 static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1593,16 +1656,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDeco
 }
 
 static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2284,16 +2345,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2319,16 +2378,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2347,16 +2404,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDec
 }
 
 static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2416,16 +2471,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersD
 }
 
 static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2451,16 +2504,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2479,16 +2530,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecode
 }
 
 static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2574,16 +2623,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDeco
 }
 
 static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2721,16 +2768,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureRe
 }
 
 static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureReasonZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2821,16 +2866,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDesti
 }
 
 static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDestinationZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3317,16 +3360,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDec
 }
 
 static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3803,31 +3844,12 @@ static inline LDKCVec_TxidZ CVec_TxidZ_clone(const LDKCVec_TxidZ *orig) {
        }
        return ret;
 }
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
 static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
 static jclass LDKMonitorEvent_CommitmentTxConfirmed_class = NULL;
 static jmethodID LDKMonitorEvent_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKMonitorEvent_UpdateCompleted_class = NULL;
-static jmethodID LDKMonitorEvent_UpdateCompleted_meth = NULL;
+static jclass LDKMonitorEvent_Completed_class = NULL;
+static jmethodID LDKMonitorEvent_Completed_meth = NULL;
 static jclass LDKMonitorEvent_UpdateFailed_class = NULL;
 static jmethodID LDKMonitorEvent_UpdateFailed_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNIEnv *env, jclass clz) {
@@ -3841,11 +3863,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        CHECK(LDKMonitorEvent_CommitmentTxConfirmed_class != NULL);
        LDKMonitorEvent_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxConfirmed_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_CommitmentTxConfirmed_meth != NULL);
-       LDKMonitorEvent_UpdateCompleted_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$UpdateCompleted"));
-       CHECK(LDKMonitorEvent_UpdateCompleted_class != NULL);
-       LDKMonitorEvent_UpdateCompleted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_UpdateCompleted_class, "<init>", "(JJ)V");
-       CHECK(LDKMonitorEvent_UpdateCompleted_meth != NULL);
+       LDKMonitorEvent_Completed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
+       CHECK(LDKMonitorEvent_Completed_class != NULL);
+       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+       CHECK(LDKMonitorEvent_Completed_meth != NULL);
        LDKMonitorEvent_UpdateFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$UpdateFailed"));
        CHECK(LDKMonitorEvent_UpdateFailed_class != NULL);
@@ -3869,13 +3891,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
                        return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxConfirmed_class, LDKMonitorEvent_CommitmentTxConfirmed_meth, commitment_tx_confirmed_ref);
                }
-               case LDKMonitorEvent_UpdateCompleted: {
-                       LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+               case LDKMonitorEvent_Completed: {
+                       LDKOutPoint funding_txo_var = obj->completed.funding_txo;
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
-                       int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
-                       return (*env)->NewObject(env, LDKMonitorEvent_UpdateCompleted_class, LDKMonitorEvent_UpdateCompleted_meth, funding_txo_ref, monitor_update_id_conv);
+                       int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
+                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
                }
                case LDKMonitorEvent_UpdateFailed: {
                        LDKOutPoint update_failed_var = obj->update_failed;
@@ -3960,16 +3982,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorer
 }
 
 static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4118,16 +4138,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
 }
 
 static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4146,16 +4164,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecode
 }
 
 static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4174,16 +4190,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDec
 }
 
 static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4202,16 +4216,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecode
 }
 
 static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4230,16 +4242,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDec
 }
 
 static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4258,16 +4268,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
 }
 
 static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4286,16 +4294,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4312,16 +4318,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUp
 }
 
 static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUpdateZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4585,16 +4589,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoD
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4613,16 +4615,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeE
 }
 
 static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4641,16 +4641,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeE
 }
 
 static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4752,16 +4750,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementIn
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4780,16 +4776,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4808,16 +4802,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4836,16 +4828,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
 }
 
 static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4901,16 +4891,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutp
 }
 
 static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4929,16 +4917,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutpu
 }
 
 static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4955,16 +4941,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
 }
 
 static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5103,6 +5087,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1get_1
        CResult_SecretKeyNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form);
+       return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
 static jclass LDKCOption_ScalarZ_Some_class = NULL;
 static jmethodID LDKCOption_ScalarZ_Some_meth = NULL;
 static jclass LDKCOption_ScalarZ_None_class = NULL;
@@ -5167,6 +5171,7 @@ typedef struct LDKBaseSign_JCalls {
        jmethodID sign_justice_revoked_htlc_meth;
        jmethodID sign_counterparty_htlc_transaction_meth;
        jmethodID sign_closing_transaction_meth;
+       jmethodID sign_holder_anchor_input_meth;
        jmethodID sign_channel_announcement_meth;
        jmethodID ready_channel_meth;
 } LDKBaseSign_JCalls;
@@ -5540,6 +5545,36 @@ LDKCResult_SignatureNoneZ sign_closing_transaction_LDKBaseSign_jcall(const void*
        }
        return ret_conv;
 }
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+       LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKTransaction anchor_tx_var = anchor_tx;
+       int8_tArray anchor_tx_arr = (*env)->NewByteArray(env, anchor_tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, anchor_tx_arr, 0, anchor_tx_var.datalen, anchor_tx_var.data);
+       Transaction_free(anchor_tx_var);
+       int64_t input_conv = input;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_holder_anchor_input_meth, anchor_tx_arr, input_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_holder_anchor_input in LDKBaseSign from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
 LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
        JNIEnv *env;
@@ -5624,6 +5659,8 @@ static inline LDKBaseSign LDKBaseSign_init (JNIEnv *env, jclass clz, jobject o,
        CHECK(calls->sign_counterparty_htlc_transaction_meth != NULL);
        calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "(J)J");
        CHECK(calls->sign_closing_transaction_meth != NULL);
+       calls->sign_holder_anchor_input_meth = (*env)->GetMethodID(env, c, "sign_holder_anchor_input", "([BJ)J");
+       CHECK(calls->sign_holder_anchor_input_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");
@@ -5647,6 +5684,7 @@ static inline LDKBaseSign LDKBaseSign_init (JNIEnv *env, jclass clz, jobject o,
                .sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
                .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
                .sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+               .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
                .sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
                .ready_channel = ready_channel_LDKBaseSign_jcall,
                .free = LDKBaseSign_JCalls_free,
@@ -5845,6 +5883,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1closing_1tr
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1holder_1anchor_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray anchor_tx, int64_t input) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+       LDKTransaction anchor_tx_ref;
+       anchor_tx_ref.datalen = (*env)->GetArrayLength(env, anchor_tx);
+       anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, anchor_tx, 0, anchor_tx_ref.datalen, anchor_tx_ref.data);
+       anchor_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -5998,16 +6050,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6084,16 +6134,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
 }
 
 static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6223,8 +6271,8 @@ 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;
+static jclass LDKAPIError_MonitorUpdateInProgress_class = NULL;
+static jmethodID LDKAPIError_MonitorUpdateInProgress_meth = NULL;
 static jclass LDKAPIError_IncompatibleShutdownScript_class = NULL;
 static jmethodID LDKAPIError_IncompatibleShutdownScript_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv *env, jclass clz) {
@@ -6248,11 +6296,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv
        CHECK(LDKAPIError_ChannelUnavailable_class != NULL);
        LDKAPIError_ChannelUnavailable_meth = (*env)->GetMethodID(env, LDKAPIError_ChannelUnavailable_class, "<init>", "(Ljava/lang/String;)V");
        CHECK(LDKAPIError_ChannelUnavailable_meth != NULL);
-       LDKAPIError_MonitorUpdateFailed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/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);
+       LDKAPIError_MonitorUpdateInProgress_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAPIError$MonitorUpdateInProgress"));
+       CHECK(LDKAPIError_MonitorUpdateInProgress_class != NULL);
+       LDKAPIError_MonitorUpdateInProgress_meth = (*env)->GetMethodID(env, LDKAPIError_MonitorUpdateInProgress_class, "<init>", "()V");
+       CHECK(LDKAPIError_MonitorUpdateInProgress_meth != NULL);
        LDKAPIError_IncompatibleShutdownScript_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAPIError$IncompatibleShutdownScript"));
        CHECK(LDKAPIError_IncompatibleShutdownScript_class != NULL);
@@ -6283,8 +6331,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
                        jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
                        return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth, err_conv);
                }
-               case LDKAPIError_MonitorUpdateFailed: {
-                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateFailed_class, LDKAPIError_MonitorUpdateFailed_meth);
+               case LDKAPIError_MonitorUpdateInProgress: {
+                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateInProgress_class, LDKAPIError_MonitorUpdateInProgress_meth);
                }
                case LDKAPIError_IncompatibleShutdownScript: {
                        LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
@@ -6678,16 +6726,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwar
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwardingInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6706,16 +6752,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpart
 }
 
 static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpartyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6734,16 +6778,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDeco
 }
 
 static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6762,16 +6804,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsD
 }
 
 static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6807,7 +6847,7 @@ static void LDKWatch_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -6826,21 +6866,18 @@ LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void*
        monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to watch_channel in LDKWatch from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -6859,15 +6896,12 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void
        update_ref = tag_ptr(update_var.inner, update_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_channel in LDKWatch from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
@@ -6921,9 +6955,9 @@ static inline LDKWatch LDKWatch_init (JNIEnv *env, jclass clz, jobject o) {
        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");
+       calls->watch_channel_meth = (*env)->GetMethodID(env, c, "watch_channel", "(JJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->watch_channel_meth != NULL);
-       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)J");
+       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        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);
@@ -6942,7 +6976,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new(JNIEnv *env,
        *res_ptr = LDKWatch_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-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) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t monitor) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -6956,12 +6990,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEn
        monitor_conv.is_owned = ptr_is_owned(monitor);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
        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 tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+       return 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) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t update) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -6975,9 +7008,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIE
        update_conv.is_owned = ptr_is_owned(update);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
        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 tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+       return ret_conv;
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -7088,6 +7120,7 @@ typedef struct LDKKeysInterface_JCalls {
        JavaVM *vm;
        jweak o;
        jmethodID get_node_secret_meth;
+       jmethodID get_node_id_meth;
        jmethodID ecdh_meth;
        jmethodID get_destination_script_meth;
        jmethodID get_shutdown_scriptpubkey_meth;
@@ -7140,6 +7173,32 @@ LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* thi
        }
        return ret_conv;
 }
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jclass recipient_conv = LDKRecipient_to_java(env, recipient);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_node_id_meth, recipient_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to get_node_id in LDKKeysInterface from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
 LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        JNIEnv *env;
@@ -7376,6 +7435,8 @@ static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, j
        calls->o = (*env)->NewWeakGlobalRef(env, o);
        calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "(Lorg/ldk/enums/Recipient;)J");
        CHECK(calls->get_node_secret_meth != NULL);
+       calls->get_node_id_meth = (*env)->GetMethodID(env, c, "get_node_id", "(Lorg/ldk/enums/Recipient;)J");
+       CHECK(calls->get_node_id_meth != NULL);
        calls->ecdh_meth = (*env)->GetMethodID(env, c, "ecdh", "(Lorg/ldk/enums/Recipient;[BJ)J");
        CHECK(calls->ecdh_meth != NULL);
        calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()[B");
@@ -7396,6 +7457,7 @@ static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, j
        LDKKeysInterface ret = {
                .this_arg = (void*) calls,
                .get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+               .get_node_id = get_node_id_LDKKeysInterface_jcall,
                .ecdh = ecdh_LDKKeysInterface_jcall,
                .get_destination_script = get_destination_script_LDKKeysInterface_jcall,
                .get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
@@ -7423,6 +7485,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1s
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, jclass recipient) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+       LDKRecipient recipient_conv = LDKRecipient_from_java(env, recipient);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1ecdh(JNIEnv *env, jclass clz, int64_t this_arg, jclass recipient, int8_tArray other_key, int64_t tweak) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -7644,16 +7716,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7672,16 +7742,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecod
 }
 
 static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7700,16 +7768,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7911,16 +7977,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDeco
 }
 
 static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8007,16 +8071,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecod
 }
 
 static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8538,16 +8600,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda
 }
 
 static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8593,16 +8653,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEv
 }
 
 static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEventZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8621,16 +8679,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8890,16 +8946,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -8930,6 +8984,179 @@ static inline LDKCVec_C2Tuple_PublicKeyTypeZZ CVec_C2Tuple_PublicKeyTypeZZ_clone
        }
        return ret;
 }
+typedef struct LDKCustomOnionMessageContents_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID tlv_type_meth;
+       jmethodID write_meth;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_t ret = (*env)->CallLongMethod(env, obj, j_calls->tlv_type_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to tlv_type in LDKCustomOnionMessageContents from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret;
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->write_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to write in LDKCustomOnionMessageContents from rust threw an exception.");
+       }
+       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);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->tlv_type_meth = (*env)->GetMethodID(env, c, "tlv_type", "()J");
+       CHECK(calls->tlv_type_meth != NULL);
+       calls->write_meth = (*env)->GetMethodID(env, c, "write", "()[B");
+       CHECK(calls->write_meth != NULL);
+
+       LDKCustomOnionMessageContents ret = {
+               .this_arg = (void*) calls,
+               .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+               .write = write_LDKCustomOnionMessageContents_jcall,
+               .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+               .free = LDKCustomOnionMessageContents_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageContents_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *res_ptr = LDKCustomOnionMessageContents_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1tlv_1type(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1write(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       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;
+}
+
+static jclass LDKCOption_CustomOnionMessageContentsZ_Some_class = NULL;
+static jmethodID LDKCOption_CustomOnionMessageContentsZ_Some_meth = NULL;
+static jclass LDKCOption_CustomOnionMessageContentsZ_None_class = NULL;
+static jmethodID LDKCOption_CustomOnionMessageContentsZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1CustomOnionMessageContentsZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_CustomOnionMessageContentsZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_CustomOnionMessageContentsZ$Some"));
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_Some_class != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_CustomOnionMessageContentsZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_Some_meth != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_CustomOnionMessageContentsZ$None"));
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_None_class != NULL);
+       LDKCOption_CustomOnionMessageContentsZ_None_meth = (*env)->GetMethodID(env, LDKCOption_CustomOnionMessageContentsZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_CustomOnionMessageContentsZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CustomOnionMessageContentsZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_CustomOnionMessageContentsZ_Some: {
+                       LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+                       *some_ret = CustomOnionMessageContents_clone(&obj->some);
+                       return (*env)->NewObject(env, LDKCOption_CustomOnionMessageContentsZ_Some_class, LDKCOption_CustomOnionMessageContentsZ_Some_meth, tag_ptr(some_ret, true));
+               }
+               case LDKCOption_CustomOnionMessageContentsZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_CustomOnionMessageContentsZ_None_class, LDKCOption_CustomOnionMessageContentsZ_None_meth);
+               }
+               default: abort();
+       }
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static jclass LDKCOption_NetAddressZ_Some_class = NULL;
 static jmethodID LDKCOption_NetAddressZ_Some_meth = NULL;
 static jclass LDKCOption_NetAddressZ_None_class = NULL;
@@ -9041,6 +9268,8 @@ static jclass LDKSendError_TooFewBlindedHops_class = NULL;
 static jmethodID LDKSendError_TooFewBlindedHops_meth = NULL;
 static jclass LDKSendError_InvalidFirstHop_class = NULL;
 static jmethodID LDKSendError_InvalidFirstHop_meth = NULL;
+static jclass LDKSendError_InvalidMessage_class = NULL;
+static jmethodID LDKSendError_InvalidMessage_meth = NULL;
 static jclass LDKSendError_BufferFull_class = NULL;
 static jmethodID LDKSendError_BufferFull_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
@@ -9064,6 +9293,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv
        CHECK(LDKSendError_InvalidFirstHop_class != NULL);
        LDKSendError_InvalidFirstHop_meth = (*env)->GetMethodID(env, LDKSendError_InvalidFirstHop_class, "<init>", "()V");
        CHECK(LDKSendError_InvalidFirstHop_meth != NULL);
+       LDKSendError_InvalidMessage_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$InvalidMessage"));
+       CHECK(LDKSendError_InvalidMessage_class != NULL);
+       LDKSendError_InvalidMessage_meth = (*env)->GetMethodID(env, LDKSendError_InvalidMessage_class, "<init>", "()V");
+       CHECK(LDKSendError_InvalidMessage_meth != NULL);
        LDKSendError_BufferFull_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BufferFull"));
        CHECK(LDKSendError_BufferFull_class != NULL);
@@ -9086,6 +9320,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt
                case LDKSendError_InvalidFirstHop: {
                        return (*env)->NewObject(env, LDKSendError_InvalidFirstHop_class, LDKSendError_InvalidFirstHop_meth);
                }
+               case LDKSendError_InvalidMessage: {
+                       return (*env)->NewObject(env, LDKSendError_InvalidMessage_class, LDKSendError_InvalidMessage_meth);
+               }
                case LDKSendError_BufferFull: {
                        return (*env)->NewObject(env, LDKSendError_BufferFull_class, LDKSendError_BufferFull_meth);
                }
@@ -9133,10 +9370,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKGraphSyncError_1ref_1fro
        LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKGraphSyncError_DecodeError: {
-                       LDKDecodeError decode_error_var = obj->decode_error;
-                       int64_t decode_error_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
-                       decode_error_ref = tag_ptr(decode_error_var.inner, false);
+                       int64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
                        return (*env)->NewObject(env, LDKGraphSyncError_DecodeError_class, LDKGraphSyncError_DecodeError_meth, decode_error_ref);
                }
                case LDKGraphSyncError_LightningError: {
@@ -9184,16 +9418,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9240,16 +9472,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecod
 }
 
 static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9268,16 +9498,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignat
 }
 
 static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9296,16 +9524,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablish
 }
 
 static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9324,16 +9550,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecod
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9352,16 +9576,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRa
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9380,16 +9602,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDe
 }
 
 static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9408,16 +9628,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDeco
 }
 
 static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9436,16 +9654,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecod
 }
 
 static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9464,16 +9680,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecode
 }
 
 static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9492,16 +9706,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9520,16 +9732,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeE
 }
 
 static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9548,16 +9758,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecode
 }
 
 static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9576,16 +9784,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9604,16 +9810,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDeco
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9632,16 +9836,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalforme
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9660,16 +9862,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9688,16 +9888,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCD
 }
 
 static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9716,16 +9914,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecod
 }
 
 static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9744,16 +9940,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecode
 }
 
 static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9772,16 +9966,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9800,16 +9992,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1
 }
 
 static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9828,16 +10018,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnn
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9856,16 +10044,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncemen
 }
 
 static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9884,16 +10070,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpd
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9912,16 +10096,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecod
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9940,16 +10122,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecode
 }
 
 static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9968,16 +10148,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDeco
 }
 
 static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -9996,16 +10174,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnoun
 }
 
 static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10024,16 +10200,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDe
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10052,16 +10226,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelI
 }
 
 static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10080,16 +10252,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelI
 }
 
 static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10108,16 +10278,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeD
 }
 
 static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10136,16 +10304,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeD
 }
 
 static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -10164,16 +10330,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFil
 }
 
 static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
        LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -11505,7 +11669,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -11529,21 +11693,18 @@ LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(con
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -11572,15 +11733,12 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcal
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
        }
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_java(env, ret);
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
@@ -11597,9 +11755,9 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        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", "(JJJ)J");
+       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->persist_new_channel_meth != NULL);
-       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)J");
+       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->update_persisted_channel_meth != NULL);
 
        LDKPersist ret = {
@@ -11615,7 +11773,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env
        *res_ptr = LDKPersist_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -11634,12 +11792,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chan
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       return 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 channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -11663,9 +11820,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
 typedef struct LDKChannelMessageHandler_JCalls {
@@ -12154,7 +12310,7 @@ void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKP
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -12172,14 +12328,19 @@ void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPubl
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKChannelMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -12358,7 +12519,7 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
        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");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        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);
@@ -12660,7 +12821,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1d
        (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
 
-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) {
+JNIEXPORT int64_t 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) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
@@ -12672,7 +12833,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1c
        msg_conv.is_owned = ptr_is_owned(msg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
        msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 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) {
@@ -12923,7 +13086,7 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co
        }
        return ret_conv;
 }
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -12941,14 +13104,19 @@ void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPubl
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKRoutingMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
@@ -13148,7 +13316,7 @@ static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *en
        CHECK(calls->get_next_channel_announcement_meth != NULL);
        calls->get_next_node_announcement_meth = (*env)->GetMethodID(env, c, "get_next_node_announcement", "([B)J");
        CHECK(calls->get_next_node_announcement_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        CHECK(calls->peer_connected_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);
@@ -13258,7 +13426,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
@@ -13270,7 +13438,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1c
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 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) {
@@ -13421,7 +13591,7 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -13439,14 +13609,19 @@ void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublic
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, init_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to peer_connected in LDKOnionMessageHandler from rust threw an exception.");
        }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
        if (get_jenv_res == JNI_EDETACHED) {
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
+       return ret_conv;
 }
 void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
@@ -13537,7 +13712,7 @@ static inline LDKOnionMessageHandler LDKOnionMessageHandler_init (JNIEnv *env, j
        calls->o = (*env)->NewWeakGlobalRef(env, o);
        calls->handle_onion_message_meth = (*env)->GetMethodID(env, c, "handle_onion_message", "([BJ)V");
        CHECK(calls->handle_onion_message_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)J");
        CHECK(calls->peer_connected_meth != NULL);
        calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
        CHECK(calls->peer_disconnected_meth != NULL);
@@ -13583,7 +13758,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1handle_1o
        (this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
@@ -13595,7 +13770,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1con
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
@@ -13888,6 +14065,137 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1
        return ret_arr;
 }
 
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID handle_custom_message_meth;
+       jmethodID read_custom_message_meth;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *msg_ret = msg;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->handle_custom_message_meth, tag_ptr(msg_ret, true));
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to handle_custom_message in LDKCustomOnionMessageHandler from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       int64_t message_type_conv = message_type;
+       LDKu8slice buffer_var = buffer;
+       int8_tArray buffer_arr = (*env)->NewByteArray(env, buffer_var.datalen);
+       (*env)->SetByteArrayRegion(env, buffer_arr, 0, buffer_var.datalen, buffer_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->read_custom_message_meth, message_type_conv, buffer_arr);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to read_custom_message in LDKCustomOnionMessageHandler from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->handle_custom_message_meth = (*env)->GetMethodID(env, c, "handle_custom_message", "(J)V");
+       CHECK(calls->handle_custom_message_meth != NULL);
+       calls->read_custom_message_meth = (*env)->GetMethodID(env, c, "read_custom_message", "(J[B)J");
+       CHECK(calls->read_custom_message_meth != NULL);
+
+       LDKCustomOnionMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .free = LDKCustomOnionMessageHandler_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageHandler_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *res_ptr = LDKCustomOnionMessageHandler_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1handle_1custom_1message(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
+       (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1read_1custom_1message(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message_type, int8_tArray buffer) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       LDKu8slice buffer_ref;
+       buffer_ref.datalen = (*env)->GetArrayLength(env, buffer);
+       buffer_ref.data = (*env)->GetByteArrayElements (env, buffer, NULL);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+       (*env)->ReleaseByteArrayElements(env, buffer, (int8_t*)buffer_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 typedef struct LDKSocketDescriptor_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -15190,11 +15498,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
        *ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15228,11 +15535,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeEr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
        *ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15310,11 +15616,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommit
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyCommitmentSecretsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
        *ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15463,11 +15768,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
        *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15518,11 +15822,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
        *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15667,11 +15970,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommit
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
        *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15737,11 +16039,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChanne
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15792,11 +16093,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransaction
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15864,11 +16164,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15919,11 +16218,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTra
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16007,11 +16305,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransact
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16153,11 +16450,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
        *ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16339,11 +16635,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErro
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
        *ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16444,11 +16739,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
        *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16499,11 +16793,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
        *ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16633,11 +16926,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
        *ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16708,11 +17000,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
        *ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16763,11 +17054,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteHintHopDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
        *ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16892,11 +17182,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
        *ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16993,11 +17282,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureRe
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1ClosureReasonZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
        *ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17094,11 +17382,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDesti
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1HTLCDestinationZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
        *ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17262,11 +17549,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1EventZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
        *ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17450,52 +17736,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxidZ_1free(JNIEnv *env,
        CVec_TxidZ_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();
-       return tag_ptr(ret_conv, true);
-}
-
-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 tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
-       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*)untag_ptr(orig);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 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);
@@ -17605,11 +17845,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorer
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FixedPenaltyScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
        *ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17761,11 +18000,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
        *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17798,11 +18036,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
        *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17853,11 +18090,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDec
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17908,11 +18144,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
        *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17963,11 +18198,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDec
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
        *ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18018,11 +18252,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18073,11 +18306,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
        *ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18127,11 +18359,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUp
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1NetworkUpdateZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
        *ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18407,11 +18638,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18462,11 +18692,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18517,11 +18746,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
        *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18592,11 +18820,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementIn
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18647,11 +18874,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAliasDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
        *ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18702,11 +18928,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
        *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18758,11 +18983,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18854,11 +19078,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutp
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18909,11 +19132,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutpu
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StaticPaymentOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18963,11 +19185,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19305,6 +19526,54 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1cl
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_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_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ScalarZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -19394,11 +19663,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
        *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19599,11 +19867,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
        *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20534,11 +20801,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwar
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyForwardingInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
        *ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20589,11 +20855,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpart
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelCounterpartyDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
        *ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20644,11 +20909,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelDetailsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
        *ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20699,11 +20963,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsD
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PhantomRouteHintsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
        *ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20797,11 +21060,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20834,11 +21096,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
        *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20889,11 +21150,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
        *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20993,11 +21253,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
        *ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21101,11 +21360,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecod
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InFlightHtlcsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
        *ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21710,11 +21968,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21811,11 +22068,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEv
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1MonitorEventZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
        *ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -21866,11 +22122,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeEr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
        *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22279,11 +22534,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHash
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22385,6 +22639,109 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyTypeZZ
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+       if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+       o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetAddressZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -22659,11 +23016,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeEr
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
        *ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22794,11 +23150,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
        *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22849,11 +23204,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignat
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
        *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22904,11 +23258,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablish
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
        *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -22959,11 +23312,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23014,11 +23366,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRa
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedFeeRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23069,11 +23420,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDe
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
        *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23124,11 +23474,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
        *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23179,11 +23528,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
        *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23234,11 +23582,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReadyDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
        *ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23289,11 +23636,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
        *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23344,11 +23690,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeE
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
        *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23399,11 +23744,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
        *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23454,11 +23798,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErro
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
        *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23509,11 +23852,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDeco
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23564,11 +23906,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalforme
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23619,11 +23960,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErr
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
        *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23674,11 +24014,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23729,11 +24068,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23784,11 +24122,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecode
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OnionMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
        *ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23839,11 +24176,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
        *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23894,11 +24230,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
        *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -23949,11 +24284,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnn
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24004,11 +24338,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncemen
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24059,11 +24392,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpd
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24114,11 +24446,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecod
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24169,11 +24500,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecode
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
        *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24224,11 +24554,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDeco
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WarningMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
        *ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24279,11 +24608,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnoun
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24334,11 +24662,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDe
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24389,11 +24716,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelI
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
        *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24444,11 +24770,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelI
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
        *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24499,11 +24824,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
        *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24554,11 +24878,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeD
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
        *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24609,11 +24932,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFil
 }
 
 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 = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
        *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -24967,6 +25289,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1outdated_1ch
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+       LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+       jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosureReason_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
@@ -25045,6 +25374,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1pa
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+       LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+       jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
@@ -25864,9 +26200,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1channel_1unavaila
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1failed(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1in_1progress(JNIEnv *env, jclass clz) {
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = APIError_monitor_update_failed();
+       *ret_copy = APIError_monitor_update_in_progress();
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -25883,6 +26219,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_APIError_1incompatible_1shu
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_APIError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+       LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+       jboolean ret_conv = APIError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BigSize_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBigSize this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -25956,6 +26299,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Hostname_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Hostname_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHostname a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHostname b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Hostname_1len(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKHostname this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -26868,6 +27226,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelConfig a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelConfig b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv *env, jclass clz) {
        LDKChannelConfig ret_var = ChannelConfig_default();
        int64_t ret_ref = 0;
@@ -27144,6 +27517,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBestBlock b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1genesis(JNIEnv *env, jclass clz, jclass network) {
        LDKNetwork network_conv = LDKNetwork_from_java(env, network);
        LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
@@ -27228,19 +27616,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1free(JNIEnv *env, jcl
        Confirm_free(this_ptr_conv);
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_clone(orig_conv));
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1completed(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_completed());
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1temporary_1failure(JNIEnv *env, jclass clz) {
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_temporary_failure());
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1in_1progress(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_in_progress());
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1permanent_1failure(JNIEnv *env, jclass clz) {
-       jclass ret_conv = LDKChannelMonitorUpdateErr_to_java(env, ChannelMonitorUpdateErr_permanent_failure());
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1permanent_1failure(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, ChannelMonitorUpdateStatus_permanent_failure());
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+       LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+       jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
        return ret_conv;
 }
 
@@ -27395,6 +27795,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKWatchedOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWatchedOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKWatchedOutput o_conv;
        o_conv.inner = untag_ptr(o);
@@ -27860,14 +28275,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1commitment_1t
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -27884,6 +28299,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1faile
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+       LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+       jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
@@ -27941,6 +28363,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1clone(JNIEnv *e
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -28927,6 +29364,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDelayedPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDelayedPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -29101,6 +29553,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescript
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKStaticPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKStaticPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -29193,6 +29660,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+       LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+       jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
@@ -31858,6 +32332,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1Channel
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1node_1features(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = provided_node_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1channel_1features(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = provided_channel_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = provided_init_features();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CounterpartyForwardingInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKCounterpartyForwardingInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -32270,44 +32768,92 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1from_1hash(JNIEnv *
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKDecodeError this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       DecodeError_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DecodeError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       DecodeError_free(this_ptr_conv);
 }
 
 static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
-       LDKDecodeError ret_var = DecodeError_clone(arg);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKDecodeError arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+       LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+       int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDecodeError orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1version(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_version();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1required_1feature(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_required_feature();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1invalid_1value(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_invalid_value();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1short_1read(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_short_read();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1bad_1length_1descriptor(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_bad_length_descriptor();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1io(JNIEnv *env, jclass clz, jclass a) {
+       LDKIOError a_conv = LDKIOError_from_java(env, a);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_io(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unsupported_compression();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DecodeError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+       LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+       jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInit this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32414,6 +32960,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Init_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInit a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInit b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKErrorMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32509,6 +33070,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKErrorMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKErrorMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKWarningMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32604,6 +33180,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WarningMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKWarningMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWarningMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPing this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32688,6 +33279,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Ping_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPing a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPing b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPong this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32753,6 +33359,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPong a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPong b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOpenChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33192,6 +33813,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOpenChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOpenChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKAcceptChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33551,6 +34187,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAcceptChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAcceptChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFundingCreated this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33694,6 +34345,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingCreated_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKFundingCreated a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingCreated b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFundingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33792,6 +34458,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKFundingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelReady this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33919,6 +34600,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReady_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelReady a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReady b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKShutdown this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34020,6 +34716,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Shutdown_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShutdown a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdown b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKClosingSignedFeeRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34104,6 +34815,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingSignedFeeRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSignedFeeRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKClosingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34253,6 +34979,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateAddHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34394,6 +35135,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateAddHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateAddHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessage_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOnionMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34455,6 +35211,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessage_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionMessage_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOnionMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOnionMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFulfillHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34572,6 +35343,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFulfillHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFulfillHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFailHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34652,6 +35438,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFailHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFailMalformedHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34751,6 +35552,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1cl
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFailMalformedHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailMalformedHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKCommitmentSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -34904,6 +35720,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommitmentSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRevokeAndACK this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35028,6 +35859,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKRevokeAndACK a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKRevokeAndACK b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUpdateFee this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35119,6 +35965,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFee_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUpdateFee a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFee b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKDataLossProtect this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35217,6 +36078,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIE
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDataLossProtect a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDataLossProtect b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelReestablish this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35316,6 +36192,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelReestablish a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReestablish b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKAnnouncementSignatures this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35459,6 +36350,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clo
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKAnnouncementSignatures a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAnnouncementSignatures b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -35540,6 +36446,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetAddress_1hostname(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetAddress_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+       LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+       jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetAddress_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
@@ -35758,6 +36671,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1c
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKNodeAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -35862,6 +36790,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36061,6 +37004,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36243,6 +37201,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36497,6 +37470,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnsignedChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36601,6 +37589,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKQueryChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36711,6 +37714,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKQueryChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReplyChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -36892,6 +37910,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKReplyChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKQueryShortChannelIds this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37016,6 +38049,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKQueryShortChannelIds a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryShortChannelIds b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKReplyShortChannelIdsEnd this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37107,6 +38155,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1cl
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKReplyShortChannelIdsEnd a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyShortChannelIdsEnd b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKGossipTimestampFilter this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -37217,6 +38280,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clon
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKGossipTimestampFilter a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKGossipTimestampFilter b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -37773,6 +38851,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommitmentUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -38661,6 +39754,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1CustomOnionMessageHandler(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1CustomMessageReader(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKIgnoringMessageHandler this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38943,7 +40047,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv *env,
        PeerManager_free(this_obj_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *env, jclass clz, int64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, int64_t logger, int64_t custom_message_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *env, jclass clz, int64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, int64_t logger, int64_t custom_message_handler) {
        LDKMessageHandler message_handler_conv;
        message_handler_conv.inner = untag_ptr(message_handler);
        message_handler_conv.is_owned = ptr_is_owned(message_handler);
@@ -39498,6 +40602,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTxCreationKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTxCreationKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
        LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
        int64_t ret_ref = 0;
@@ -39727,6 +40846,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelPublicKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelPublicKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -39962,6 +41096,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clo
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKHTLCOutputInCommitment a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCOutputInCommitment b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40878,6 +42027,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1hash(JN
        return ret_conv;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKClosingTransaction a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingTransaction b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1new(JNIEnv *env, jclass clz, int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, int64_t funding_outpoint) {
        LDKCVec_u8Z to_holder_script_ref;
        to_holder_script_ref.datalen = (*env)->GetArrayLength(env, to_holder_script);
@@ -41518,22 +42682,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1free(JNIE
        ChannelTypeFeatures_free(this_obj_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known_1channel_1features(JNIEnv *env, jclass clz) {
-       LDKInitFeatures ret_var = InitFeatures_known_channel_features();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known_1channel_1features(JNIEnv *env, jclass clz) {
-       LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv *env, jclass clz) {
        LDKInitFeatures ret_var = InitFeatures_empty();
        int64_t ret_ref = 0;
@@ -41542,14 +42690,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKInitFeatures ret_var = InitFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKInitFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41568,14 +42708,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKNodeFeatures ret_var = NodeFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNodeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41594,14 +42726,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKChannelFeatures ret_var = ChannelFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41620,14 +42744,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1empty(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKInvoiceFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41646,14 +42762,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1empty(
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1known(JNIEnv *env, jclass clz) {
-       LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1requires_1unknown_1bits(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelTypeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -43099,6 +44207,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShutdownScript a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdownScript b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvalidShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInvalidShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -43479,6 +44602,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1node_1failur
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+       LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+       jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
@@ -43795,6 +44925,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelUpdateInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdateInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelUpdateInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44043,6 +45188,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1directional_1info(JNIEnv *env, jclass clz, int64_t this_arg, int8_t channel_flags) {
        LDKChannelInfo this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -44619,6 +45779,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAnnouncementInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncementInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44714,6 +45889,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAlias_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAlias_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeAlias a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAlias b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAlias_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAlias obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -44899,6 +46089,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNodeInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45121,34 +46326,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1channel_1failed(
        NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed_1permanent(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray node_id) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKPublicKey _node_id_ref;
-       CHECK((*env)->GetArrayLength(env, _node_id) == 33);
-       (*env)->GetByteArrayRegion(env, _node_id, 0, 33, _node_id_ref.compressed_form);
-       NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels(&this_arg_conv);
+       NetworkGraph_remove_stale_channels_and_tracking(&this_arg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1with_1time(JNIEnv *env, jclass clz, int64_t this_arg, int64_t current_time_unix) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking_1with_1time(JNIEnv *env, jclass clz, int64_t this_arg, int64_t current_time_unix) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+       NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
@@ -47193,6 +48398,63 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters
        ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1amount_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1amount_1multiplier_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1no_1updates_1half_1life(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1no_1updates_1half_1life(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1anti_1probing_1penalty_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKProbabilisticScoringParameters this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47644,6 +48906,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1first_1
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1message(JNIEnv *env, jclass clz) {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_invalid_message();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full(JNIEnv *env, jclass clz) {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_buffer_full();
@@ -47651,7 +48920,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full(JNI
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t keys_manager, int64_t logger) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+       LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+       jboolean ret_conv = SendError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t keys_manager, int64_t logger, int64_t custom_handler) {
        void* keys_manager_ptr = untag_ptr(keys_manager);
        CHECK_ACCESS(keys_manager_ptr);
        LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
@@ -47666,14 +48951,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+       void* custom_handler_ptr = untag_ptr(custom_handler);
+       CHECK_ACCESS(custom_handler_ptr);
+       LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+       if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+       }
+       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1onion_1message(JNIEnv *env, jclass clz, int64_t this_arg, jobjectArray intermediate_nodes, int64_t destination, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1custom_1onion_1message(JNIEnv *env, jclass clz, int64_t this_arg, jobjectArray intermediate_nodes, int64_t destination, int64_t msg, int64_t reply_path) {
        LDKOnionMessenger this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -47696,13 +48988,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1onion
        CHECK_ACCESS(destination_ptr);
        LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
        // WARNING: we may need a move here but no clone is available for LDKDestination
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
        LDKBlindedRoute reply_path_conv;
        reply_path_conv.inner = untag_ptr(reply_path);
        reply_path_conv.is_owned = ptr_is_owned(reply_path);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv.is_owned = false;
        LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
-       *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+       *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -47728,6 +49027,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1as_1OnionMe
        return tag_ptr(ret_ret, true);
 }
 
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(arg);
+       return tag_ptr(ret_ret, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       void* arg_ptr = untag_ptr(arg);
+       if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+       LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+       int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       void* orig_ptr = untag_ptr(orig);
+       if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+       LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageContents_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FilesystemPersister_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKFilesystemPersister this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -48069,6 +49399,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ParseError_1skip(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+       LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+       jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -48117,6 +49454,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1seman
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+       LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+       jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInvoice this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -50206,7 +51550,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InFlightHtlcs_1read(JNIEnv
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t keys_manager, jclass network) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t keys_manager, int64_t logger, jclass network) {
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
        LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
@@ -50239,13 +51583,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice(JN
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_phantom_invoice(amt_msat_conv, payment_hash_ref, description_conv, invoice_expiry_delta_secs, phantom_route_hints_constr, keys_manager_conv, network_conv);
+       *ret_conv = create_phantom_invoice(amt_msat_conv, payment_hash_ref, description_conv, invoice_expiry_delta_secs, phantom_route_hints_constr, keys_manager_conv, logger_conv, network_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t description_hash, int64_tArray phantom_route_hints, int64_t keys_manager, jclass network) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t amt_msat, int8_tArray payment_hash, int32_t invoice_expiry_delta_secs, int64_t description_hash, int64_tArray phantom_route_hints, int64_t keys_manager, int64_t logger, jclass network) {
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
        LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
@@ -50282,13 +51633,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1w
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_phantom_invoice_with_description_hash(amt_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, description_hash_conv, phantom_route_hints_constr, keys_manager_conv, network_conv);
+       *ret_conv = create_phantom_invoice_with_description_hash(amt_msat_conv, payment_hash_ref, invoice_expiry_delta_secs, description_hash_conv, phantom_route_hints_constr, keys_manager_conv, logger_conv, network_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50301,6 +51659,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50308,11 +51673,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = java_to_owned_str(env, description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50325,6 +51690,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50336,11 +51708,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50353,6 +51725,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50364,11 +51743,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, jclass network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1and_1duration_1since_1epoch(JNIEnv *env, jclass clz, int64_t channelmanager, int64_t keys_manager, int64_t logger, jclass network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -50381,6 +51760,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_java(env, network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -50388,7 +51774,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1chan
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = java_to_owned_str(env, description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
@@ -50550,15 +51936,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1sync_1network_1graph_1with_1file_1path(JNIEnv *env, jclass clz, int64_t this_arg, jstring sync_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray update_data) {
        LDKRapidGossipSync this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKStr sync_path_conv = java_to_owned_str(env, sync_path);
+       LDKu8slice update_data_ref;
+       update_data_ref.datalen = (*env)->GetArrayLength(env, update_data);
+       update_data_ref.data = (*env)->GetByteArrayElements (env, update_data, NULL);
        LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
-       *ret_conv = RapidGossipSync_sync_network_graph_with_file_path(&this_arg_conv, sync_path_conv);
+       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
+       (*env)->ReleaseByteArrayElements(env, update_data, (int8_t*)update_data_ref.data, 0);
        return tag_ptr(ret_conv, true);
 }
 
@@ -50602,11 +51991,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1clone(JNIEn
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1decode_1error(JNIEnv *env, jclass clz, int64_t a) {
-       LDKDecodeError a_conv;
-       a_conv.inner = untag_ptr(a);
-       a_conv.is_owned = ptr_is_owned(a);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
-       a_conv = DecodeError_clone(&a_conv);
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+       a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
        LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
        *ret_copy = GraphSyncError_decode_error(a_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
@@ -50625,18 +52013,3 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1lightning_1
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray update_data) {
-       LDKRapidGossipSync this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       LDKu8slice update_data_ref;
-       update_data_ref.datalen = (*env)->GetArrayLength(env, update_data);
-       update_data_ref.data = (*env)->GetByteArrayElements (env, update_data, NULL);
-       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
-       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
-       (*env)->ReleaseByteArrayElements(env, update_data, (int8_t*)update_data_ref.data, 0);
-       return tag_ptr(ret_conv, true);
-}
-
diff --git a/src/main/jni/org_ldk_enums_ChannelMonitorUpdateErr.h b/src/main/jni/org_ldk_enums_ChannelMonitorUpdateErr.h
deleted file mode 100644 (file)
index a530e9d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_ldk_enums_ChannelMonitorUpdateErr */
-
-#ifndef _Included_org_ldk_enums_ChannelMonitorUpdateErr
-#define _Included_org_ldk_enums_ChannelMonitorUpdateErr
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     org_ldk_enums_ChannelMonitorUpdateErr
- * Method:    init
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateErr_init
-  (JNIEnv *, jclass);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/main/jni/org_ldk_enums_ChannelMonitorUpdateStatus.h b/src/main/jni/org_ldk_enums_ChannelMonitorUpdateStatus.h
new file mode 100644 (file)
index 0000000..c290046
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_ChannelMonitorUpdateStatus */
+
+#ifndef _Included_org_ldk_enums_ChannelMonitorUpdateStatus
+#define _Included_org_ldk_enums_ChannelMonitorUpdateStatus
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_enums_ChannelMonitorUpdateStatus
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_ChannelMonitorUpdateStatus_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_enums_Recipient.h b/src/main/jni/org_ldk_enums_Recipient.h
new file mode 100644 (file)
index 0000000..797bc90
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_Recipient */
+
+#ifndef _Included_org_ldk_enums_Recipient
+#define _Included_org_ldk_enums_Recipient
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_enums_Recipient
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_Recipient_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 9c415656050cc30a11ea274bd3382918ee619c18..77e8cb0beec1307b8c5948b71e1d0aa619139e9f 100644 (file)
@@ -191,6 +191,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteNoneZ_1g
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedRouteNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKDecodeError_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKDecodeError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_BlindedRouteDecodeErrorZ_get_ok
@@ -951,22 +959,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1g
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_get_ok
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_get_err
- * Signature: (J)Lorg/ldk/enums/ChannelMonitorUpdateErr;
- */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1get_1err
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKMonitorEvent_ref_from_ptr
@@ -1535,6 +1527,22 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_ScalarZ_ref_from_ptr
@@ -1655,6 +1663,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1counterparty_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1closing_1transaction
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BaseSign_sign_holder_anchor_input
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BaseSign_1sign_1holder_1anchor_1input
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BaseSign_sign_channel_announcement
@@ -2106,17 +2122,17 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Watch_watch_channel
- * Signature: (JJJ)J
+ * Signature: (JJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
   (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Watch_update_channel
- * Signature: (JJJ)J
+ * Signature: (JJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
   (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
@@ -2159,6 +2175,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret
   (JNIEnv *, jclass, jlong, jobject);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    KeysInterface_get_node_id
+ * Signature: (JLorg/ldk/enums/Recipient;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1id
+  (JNIEnv *, jclass, jlong, jobject);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    KeysInterface_ecdh
@@ -2775,6 +2799,54 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCustomOnionMessageContents_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKCustomOnionMessageContents;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageContents_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageContents_tlv_type
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1tlv_1type
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageContents_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_CustomOnionMessageContentsZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_CustomOnionMessageContentsZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CustomOnionMessageContentsZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_NetAddressZ_ref_from_ptr
@@ -3706,17 +3778,17 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Persist_persist_new_channel
- * Signature: (JJJJ)J
+ * Signature: (JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
   (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Persist_update_persisted_channel
- * Signature: (JJJJJ)J
+ * Signature: (JJJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
   (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong);
 
 /*
@@ -3866,9 +3938,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1d
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMessageHandler_peer_connected
- * Signature: (J[BJ)V
+ * Signature: (J[BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
   (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
 /*
@@ -3970,9 +4042,9 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1n
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RoutingMessageHandler_peer_connected
- * Signature: (J[BJ)V
+ * Signature: (J[BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1peer_1connected
   (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
 /*
@@ -4050,9 +4122,9 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1handle_1o
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OnionMessageHandler_peer_connected
- * Signature: (J[BJ)V
+ * Signature: (J[BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessageHandler_1peer_1connected
   (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
 /*
@@ -4127,6 +4199,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1handle_
 JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_CustomMessageHandler_1get_1and_1clear_1pending_1msg
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCustomOnionMessageHandler_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKCustomOnionMessageHandler;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCustomOnionMessageHandler_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageHandler_handle_custom_message
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1handle_1custom_1message
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageHandler_read_custom_message
+ * Signature: (JJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1read_1custom_1message
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKSocketDescriptor_new
@@ -6367,54 +6463,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactio
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxidZ_1free
   (JNIEnv *, jclass, jobjectArray);
 
-/*
- * 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/ChannelMonitorUpdateErr;)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err
-  (JNIEnv *, jclass, jobject);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_is_ok
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1is_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * 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_ptr
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone_1ptr
-  (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
@@ -7927,6 +7975,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1clon
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_ScalarZ_some
@@ -10487,6 +10583,94 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyTypeZ_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyTypeZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_CustomOnionMessageContentsZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_CustomOnionMessageContentsZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_CustomOnionMessageContentsZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_CustomOnionMessageContentsZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_CustomOnionMessageContentsZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CustomOnionMessageContentsZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1CustomOnionMessageContentsZDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_NetAddressZ_some
@@ -12711,6 +12895,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1disconnected_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1outdated_1channel_1manager
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosureReason_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosureReason_write
@@ -12775,6 +12967,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1unknown_1nex
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCDestination_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCDestination_write
@@ -13233,10 +13433,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_APIError_1channel_1unavailabl
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    APIError_monitor_update_failed
+ * Method:    APIError_monitor_update_in_progress
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1failed
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1in_1progress
   (JNIEnv *, jclass);
 
 /*
@@ -13247,6 +13447,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_APIError_1monitor_1update_1fa
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_APIError_1incompatible_1shutdown_1script
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    APIError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_APIError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BigSize_free
@@ -13303,6 +13511,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Hostname_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Hostname_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Hostname_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Hostname_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Hostname_len
@@ -14047,6 +14263,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelConfig_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelConfig_default
@@ -14231,6 +14455,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BestBlock_from_genesis
@@ -14313,28 +14545,44 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitorUpdateErr_clone
- * Signature: (J)Lorg/ldk/enums/ChannelMonitorUpdateErr;
+ * Method:    ChannelMonitorUpdateStatus_clone
+ * Signature: (J)Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1clone
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitorUpdateErr_temporary_failure
- * Signature: ()Lorg/ldk/enums/ChannelMonitorUpdateErr;
+ * Method:    ChannelMonitorUpdateStatus_completed
+ * Signature: ()Lorg/ldk/enums/ChannelMonitorUpdateStatus;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1completed
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitorUpdateStatus_in_progress
+ * Signature: ()Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1temporary_1failure
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1in_1progress
   (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitorUpdateErr_permanent_failure
- * Signature: ()Lorg/ldk/enums/ChannelMonitorUpdateErr;
+ * Method:    ChannelMonitorUpdateStatus_permanent_failure
+ * Signature: ()Lorg/ldk/enums/ChannelMonitorUpdateStatus;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateErr_1permanent_1failure
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1permanent_1failure
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitorUpdateStatus_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdateStatus_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Watch_free
@@ -14431,6 +14679,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WatchedOutput_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WatchedOutput_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    WatchedOutput_hash
@@ -14729,10 +14985,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1commitment_1tx_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    MonitorEvent_update_completed
+ * Method:    MonitorEvent_completed
  * Signature: (JJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1completed
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
@@ -14743,6 +14999,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1complet
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1update_1failed
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    MonitorEvent_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    MonitorEvent_write
@@ -14783,6 +15047,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCUpdate_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCUpdate_write
@@ -15303,6 +15575,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescripto
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DelayedPaymentOutputDescriptor_write
@@ -15415,6 +15695,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    StaticPaymentOutputDescriptor_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    StaticPaymentOutputDescriptor_write
@@ -15479,6 +15767,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1de
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1static_1payment_1output
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendableOutputDescriptor_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpendableOutputDescriptor_write
@@ -17031,6 +17327,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1current_1best
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    provided_node_features
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_provided_1node_1features
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    provided_channel_features
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_provided_1channel_1features
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    provided_init_features
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_provided_1init_1features
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CounterpartyForwardingInfo_write
@@ -17279,6 +17599,70 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_unknown_version
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1version
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_unknown_required_feature
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unknown_1required_1feature
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_invalid_value
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1invalid_1value
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_short_read
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1short_1read
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_bad_length_descriptor
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1bad_1length_1descriptor
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_io
+ * Signature: (Lorg/ldk/enums/IOError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1io
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_unsupported_compression
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DecodeError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Init_free
@@ -17343,6 +17727,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Init_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Init_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorMessage_free
@@ -17407,6 +17799,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErrorMessage_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    WarningMessage_free
@@ -17471,6 +17871,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    WarningMessage_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_WarningMessage_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Ping_free
@@ -17535,6 +17943,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Ping_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Ping_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Pong_free
@@ -17583,6 +17999,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Pong_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OpenChannel_free
@@ -17911,6 +18335,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OpenChannel_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AcceptChannel_free
@@ -18175,6 +18607,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    AcceptChannel_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingCreated_free
@@ -18271,6 +18711,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    FundingCreated_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingCreated_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingSigned_free
@@ -18335,6 +18783,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    FundingSigned_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_FundingSigned_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReady_free
@@ -18415,6 +18871,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelReady_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReady_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Shutdown_free
@@ -18479,6 +18943,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Shutdown_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Shutdown_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingSignedFeeRange_free
@@ -18543,6 +19015,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1clone_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosingSignedFeeRange_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSignedFeeRange_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingSigned_free
@@ -18639,6 +19119,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosingSigned_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateAddHTLC_free
@@ -18743,6 +19231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UpdateAddHTLC_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OnionMessage_free
@@ -18783,6 +19279,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessage_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessage_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OnionMessage_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionMessage_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFulfillHTLC_free
@@ -18863,6 +19367,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UpdateFulfillHTLC_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailHTLC_free
@@ -18919,6 +19431,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UpdateFailHTLC_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailMalformedHTLC_free
@@ -18991,6 +19511,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clon
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UpdateFailMalformedHTLC_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CommitmentSigned_free
@@ -19071,6 +19599,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CommitmentSigned_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RevokeAndACK_free
@@ -19151,6 +19687,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RevokeAndACK_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFee_free
@@ -19215,6 +19759,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UpdateFee_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UpdateFee_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DataLossProtect_free
@@ -19279,6 +19831,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DataLossProtect_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_free
@@ -19351,6 +19911,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone_1pt
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelReestablish_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AnnouncementSignatures_free
@@ -19447,6 +20015,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    AnnouncementSignatures_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetAddress_free
@@ -19511,6 +20087,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetAddress_1onion_1v3
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetAddress_1hostname
   (JNIEnv *, jclass, jlong, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NetAddress_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetAddress_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetAddress_write
@@ -19647,6 +20231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clo
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncement_free
@@ -19711,6 +20303,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeAnnouncement_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedChannelAnnouncement_free
@@ -19847,6 +20447,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedChannelAnnouncement_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelAnnouncement_free
@@ -19959,6 +20567,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone_1p
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelAnnouncement_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedChannelUpdate_free
@@ -20151,6 +20767,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedChannelUpdate_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelUpdate_free
@@ -20215,6 +20839,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelUpdate_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    QueryChannelRange_free
@@ -20295,6 +20927,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    QueryChannelRange_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ReplyChannelRange_free
@@ -20407,6 +21047,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ReplyChannelRange_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    QueryShortChannelIds_free
@@ -20471,6 +21119,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    QueryShortChannelIds_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ReplyShortChannelIdsEnd_free
@@ -20535,6 +21191,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clon
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ReplyShortChannelIdsEnd_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    GossipTimestampFilter_free
@@ -20615,6 +21279,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    GossipTimestampFilter_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorAction_free
@@ -20879,6 +21551,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CommitmentUpdate_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMessageHandler_free
@@ -21511,6 +22191,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1O
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1OnionMessageHandler
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IgnoringMessageHandler_as_CustomOnionMessageHandler
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1CustomOnionMessageHandler
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    IgnoringMessageHandler_as_CustomMessageReader
@@ -21706,10 +22394,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerManager_new
- * Signature: (J[BJ[BJJ)J
+ * Signature: (J[BI[BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jint, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -22031,6 +22719,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_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxCreationKeys_clone_ptr
@@ -22175,6 +22871,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelPublicKeys_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelPublicKeys_write
@@ -22327,6 +23031,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_write
@@ -22887,6 +23599,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1hash
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosingTransaction_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosingTransaction_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingTransaction_new
@@ -23279,22 +23999,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    InitFeatures_known_channel_features
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known_1channel_1features
-  (JNIEnv *, jclass);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    NodeFeatures_known_channel_features
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known_1channel_1features
-  (JNIEnv *, jclass);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InitFeatures_empty
@@ -23303,14 +24007,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known_1channel_
 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:    InitFeatures_requires_unknown_bits
@@ -23327,14 +24023,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1un
 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:    NodeFeatures_requires_unknown_bits
@@ -23351,14 +24039,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1un
 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:    ChannelFeatures_requires_unknown_bits
@@ -23375,14 +24055,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1requires_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1empty
   (JNIEnv *, jclass);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    InvoiceFeatures_known
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1known
-  (JNIEnv *, jclass);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InvoiceFeatures_requires_unknown_bits
@@ -23399,14 +24071,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceFeatures_1requires_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1empty
   (JNIEnv *, jclass);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelTypeFeatures_known
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTypeFeatures_1known
-  (JNIEnv *, jclass);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelTypeFeatures_requires_unknown_bits
@@ -24599,6 +25263,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShutdownScript_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InvalidShutdownScript_free
@@ -24871,6 +25543,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1channel_1failu
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1node_1failure
   (JNIEnv *, jclass, jbyteArray, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NetworkUpdate_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NetworkUpdate_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetworkUpdate_write
@@ -25079,6 +25759,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelUpdateInfo_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelUpdateInfo_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelUpdateInfo_write
@@ -25231,6 +25919,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelInfo_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelInfo_get_directional_info
@@ -25607,6 +26303,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeAnnouncementInfo_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncementInfo_write
@@ -25671,6 +26375,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAlias_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAlias_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeAlias_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeAlias_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAlias_write
@@ -25767,6 +26479,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeInfo_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_write
@@ -25881,26 +26601,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1channel_1failed
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NetworkGraph_node_failed
- * Signature: (J[BZ)V
+ * Method:    NetworkGraph_node_failed_permanent
+ * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed
-  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1node_1failed_1permanent
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NetworkGraph_remove_stale_channels
+ * Method:    NetworkGraph_remove_stale_channels_and_tracking
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NetworkGraph_remove_stale_channels_with_time
+ * Method:    NetworkGraph_remove_stale_channels_and_tracking_with_time
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1with_1time
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1remove_1stale_1channels_1and_1tracking_1with_1time
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
@@ -27111,6 +27831,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameter
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1liquidity_1penalty_1amount_1multiplier_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1multiplier_1msat
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1multiplier_1msat
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1liquidity_1penalty_1amount_1multiplier_1msat
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1liquidity_1penalty_1amount_1multiplier_1msat
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_get_historical_no_updates_half_life
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1get_1historical_1no_1updates_1half_1life
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ProbabilisticScoringParameters_set_historical_no_updates_half_life
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ProbabilisticScoringParameters_1set_1historical_1no_1updates_1half_1life
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ProbabilisticScoringParameters_get_anti_probing_penalty_msat
@@ -27407,6 +28175,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1too_1few_1blinded_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1first_1hop
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SendError_invalid_message
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1message
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SendError_buffer_full
@@ -27415,21 +28191,37 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1invalid_1first_1ho
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SendError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageHandler_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageHandler_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OnionMessenger_new
- * Signature: (JJ)J
+ * Signature: (JJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new
-  (JNIEnv *, jclass, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OnionMessenger_send_onion_message
- * Signature: (J[[BJJ)J
+ * Method:    OnionMessenger_send_custom_onion_message
+ * Signature: (J[[BJJJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1onion_1message
-  (JNIEnv *, jclass, jlong, jobjectArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1send_1custom_1onion_1message
+  (JNIEnv *, jclass, jlong, jobjectArray, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27447,6 +28239,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1as_1OnionMess
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1as_1OnionMessageProvider
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageContents_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageContents_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CustomOnionMessageContents_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CustomOnionMessageContents_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FilesystemPersister_free
@@ -27711,6 +28527,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ParseError_1invalid_1slice_1l
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ParseError_1skip
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ParseError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ParseOrSemanticError_free
@@ -27751,6 +28575,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1parse_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1semantic_1error
   (JNIEnv *, jclass, jobject);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ParseOrSemanticError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ParseOrSemanticError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Invoice_free
@@ -29338,50 +30170,50 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InFlightHtlcs_1read
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_phantom_invoice
- * Signature: (J[BLjava/lang/String;I[JJLorg/ldk/enums/Currency;)J
+ * Signature: (J[BLjava/lang/String;I[JJJLorg/ldk/enums/Currency;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice
-  (JNIEnv *, jclass, jlong, jbyteArray, jstring, jint, jlongArray, jlong, jobject);
+  (JNIEnv *, jclass, jlong, jbyteArray, jstring, jint, jlongArray, jlong, jlong, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_phantom_invoice_with_description_hash
- * Signature: (J[BIJ[JJLorg/ldk/enums/Currency;)J
+ * Signature: (J[BIJ[JJJLorg/ldk/enums/Currency;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1phantom_1invoice_1with_1description_1hash
-  (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlongArray, jlong, jobject);
+  (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlongArray, jlong, jlong, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_invoice_from_channelmanager
- * Signature: (JJLorg/ldk/enums/Currency;JLjava/lang/String;I)J
+ * Signature: (JJJLorg/ldk/enums/Currency;JLjava/lang/String;I)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager
-  (JNIEnv *, jclass, jlong, jlong, jobject, jlong, jstring, jint);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jobject, jlong, jstring, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_invoice_from_channelmanager_with_description_hash
- * Signature: (JJLorg/ldk/enums/Currency;JJI)J
+ * Signature: (JJJLorg/ldk/enums/Currency;JJI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash
-  (JNIEnv *, jclass, jlong, jlong, jobject, jlong, jlong, jint);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jobject, jlong, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch
- * Signature: (JJLorg/ldk/enums/Currency;JJJI)J
+ * Signature: (JJJLorg/ldk/enums/Currency;JJJI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1with_1description_1hash_1and_1duration_1since_1epoch
-  (JNIEnv *, jclass, jlong, jlong, jobject, jlong, jlong, jlong, jint);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jobject, jlong, jlong, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_invoice_from_channelmanager_and_duration_since_epoch
- * Signature: (JJLorg/ldk/enums/Currency;JLjava/lang/String;JI)J
+ * Signature: (JJJLorg/ldk/enums/Currency;JLjava/lang/String;JI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1invoice_1from_1channelmanager_1and_1duration_1since_1epoch
-  (JNIEnv *, jclass, jlong, jlong, jobject, jlong, jstring, jlong, jint);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jobject, jlong, jstring, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29505,11 +30337,11 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RapidGossipSync_sync_network_graph_with_file_path
- * Signature: (JLjava/lang/String;)J
+ * Method:    RapidGossipSync_update_network_graph
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1sync_1network_1graph_1with_1file_1path
-  (JNIEnv *, jclass, jlong, jstring);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29559,14 +30391,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1decode_1error
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GraphSyncError_1lightning_1error
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RapidGossipSync_update_network_graph
- * Signature: (J[B)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RapidGossipSync_1update_1network_1graph
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKBech32Error.h b/src/main/jni/org_ldk_impl_bindings_LDKBech32Error.h
new file mode 100644 (file)
index 0000000..8dfd55d
--- /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_LDKBech32Error */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKBech32Error
+#define _Included_org_ldk_impl_bindings_LDKBech32Error
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKBech32Error
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKBech32Error_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ.h
new file mode 100644 (file)
index 0000000..05648d5
--- /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_LDKCOption_C2Tuple_u64u64ZZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_C2Tuple_u64u64ZZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C2Tuple_1u64u64ZZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.h
new file mode 100644 (file)
index 0000000..b435ce9
--- /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_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ.h
new file mode 100644 (file)
index 0000000..279850d
--- /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_LDKCOption_CustomOnionMessageContentsZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_CustomOnionMessageContentsZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1CustomOnionMessageContentsZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ.h
new file mode 100644 (file)
index 0000000..5f63824
--- /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_LDKCOption_HTLCDestinationZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_HTLCDestinationZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1HTLCDestinationZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_NetAddressZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_NetAddressZ.h
new file mode 100644 (file)
index 0000000..62bbfa2
--- /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_LDKCOption_NetAddressZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_NetAddressZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_NetAddressZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_NetAddressZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1NetAddressZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_ScalarZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_ScalarZ.h
new file mode 100644 (file)
index 0000000..13718c0
--- /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_LDKCOption_ScalarZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_ScalarZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_ScalarZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_ScalarZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ScalarZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_WriteableScoreZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_WriteableScoreZ.h
new file mode 100644 (file)
index 0000000..2d2c2fe
--- /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_LDKCOption_WriteableScoreZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_WriteableScoreZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_WriteableScoreZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_WriteableScoreZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1WriteableScoreZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKDecodeError.h b/src/main/jni/org_ldk_impl_bindings_LDKDecodeError.h
new file mode 100644 (file)
index 0000000..b08416b
--- /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_LDKDecodeError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKDecodeError
+#define _Included_org_ldk_impl_bindings_LDKDecodeError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKDecodeError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKDestination.h b/src/main/jni/org_ldk_impl_bindings_LDKDestination.h
new file mode 100644 (file)
index 0000000..2e3793c
--- /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_LDKDestination */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKDestination
+#define _Included_org_ldk_impl_bindings_LDKDestination
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKDestination
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDestination_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKEffectiveCapacity.h b/src/main/jni/org_ldk_impl_bindings_LDKEffectiveCapacity.h
new file mode 100644 (file)
index 0000000..c4b22be
--- /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_LDKEffectiveCapacity */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKEffectiveCapacity
+#define _Included_org_ldk_impl_bindings_LDKEffectiveCapacity
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKEffectiveCapacity
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEffectiveCapacity_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKGossipSync.h b/src/main/jni/org_ldk_impl_bindings_LDKGossipSync.h
new file mode 100644 (file)
index 0000000..2dd3e2e
--- /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_LDKGossipSync */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKGossipSync
+#define _Included_org_ldk_impl_bindings_LDKGossipSync
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKGossipSync
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKGossipSync_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKGraphSyncError.h b/src/main/jni/org_ldk_impl_bindings_LDKGraphSyncError.h
new file mode 100644 (file)
index 0000000..12e6fd1
--- /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_LDKGraphSyncError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKGraphSyncError
+#define _Included_org_ldk_impl_bindings_LDKGraphSyncError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKGraphSyncError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKGraphSyncError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKHTLCDestination.h b/src/main/jni/org_ldk_impl_bindings_LDKHTLCDestination.h
new file mode 100644 (file)
index 0000000..6f45f3f
--- /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_LDKHTLCDestination */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKHTLCDestination
+#define _Included_org_ldk_impl_bindings_LDKHTLCDestination
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKHTLCDestination
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKParseError.h b/src/main/jni/org_ldk_impl_bindings_LDKParseError.h
new file mode 100644 (file)
index 0000000..73966e5
--- /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_LDKParseError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKParseError
+#define _Included_org_ldk_impl_bindings_LDKParseError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKParseError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKParseError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKParseOrSemanticError.h b/src/main/jni/org_ldk_impl_bindings_LDKParseOrSemanticError.h
new file mode 100644 (file)
index 0000000..8f7bf6c
--- /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_LDKParseOrSemanticError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKParseOrSemanticError
+#define _Included_org_ldk_impl_bindings_LDKParseOrSemanticError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKParseOrSemanticError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKParseOrSemanticError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKRetry.h b/src/main/jni/org_ldk_impl_bindings_LDKRetry.h
new file mode 100644 (file)
index 0000000..a99f181
--- /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_LDKRetry */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKRetry
+#define _Included_org_ldk_impl_bindings_LDKRetry
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKRetry
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKRetry_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKSendError.h b/src/main/jni/org_ldk_impl_bindings_LDKSendError.h
new file mode 100644 (file)
index 0000000..4bcf225
--- /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_LDKSendError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKSendError
+#define _Included_org_ldk_impl_bindings_LDKSendError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKSendError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index f12bd78526108e3334fa8536a9381689d037a21d..d155e93fefaabb0882197fab707ab262f72ef87a 100644 (file)
@@ -46,6 +46,7 @@ class HumanObjectPeerTestInstance {
         KeysInterface manual_keysif(KeysInterface underlying_if) {
             return KeysInterface.new_impl(new KeysInterface.KeysInterfaceInterface() {
                 @Override public Result_SecretKeyNoneZ get_node_secret(Recipient recipient) { return underlying_if.get_node_secret(recipient); }
+                @Override public Result_PublicKeyNoneZ get_node_id(Recipient recipient) { return underlying_if.get_node_id(recipient); }
 
                 @Override public Result_SharedSecretNoneZ ecdh(Recipient recipient, byte[] other_key, Option_ScalarZ tweak) { return underlying_if.ecdh(recipient, other_key, tweak); }
                 @Override public byte[] get_destination_script() { return underlying_if.get_destination_script(); }
@@ -89,6 +90,9 @@ class HumanObjectPeerTestInstance {
                         @Override public Result_SignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx) {
                             return underlying_base.sign_closing_transaction(closing_tx);
                         }
+                        @Override public Result_SignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
+                            return underlying_base.sign_holder_anchor_input(anchor_tx, input);
+                        }
                         @Override public Result_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) {
                             return underlying_base.sign_channel_announcement(msg);
                         }
@@ -135,21 +139,21 @@ class HumanObjectPeerTestInstance {
 
         Watch get_manual_watch() {
             Watch.WatchInterface watch_impl = new Watch.WatchInterface() {
-                public Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, ChannelMonitor monitor) {
+                public ChannelMonitorUpdateStatus watch_channel(OutPoint funding_txo, ChannelMonitor monitor) {
                     synchronized (monitors) {
                         assert monitors.put(Arrays.toString(funding_txo.get_txid()), monitor) == null;
                     }
-                    return Result_NoneChannelMonitorUpdateErrZ.ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
 
-                public Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) {
+                public ChannelMonitorUpdateStatus update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) {
                     synchronized (monitors) {
                         String txid = Arrays.toString(funding_txo.get_txid());
                         assert monitors.containsKey(txid);
                         Result_NoneNoneZ update_res = monitors.get(txid).update_monitor(update, tx_broadcaster, fee_estimator, logger);
                         assert update_res instanceof Result_NoneNoneZ.Result_NoneNoneZ_OK;
                     }
-                    return Result_NoneChannelMonitorUpdateErrZ.ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
 
                 @Override
@@ -245,17 +249,17 @@ class HumanObjectPeerTestInstance {
             this.seed = seed;
             Persist persister = Persist.new_impl(new Persist.PersistInterface() {
                 @Override
-                public Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint id, ChannelMonitor data, MonitorUpdateId update_id) {
+                public ChannelMonitorUpdateStatus persist_new_channel(OutPoint id, ChannelMonitor data, MonitorUpdateId update_id) {
                     synchronized (monitors) {
                         String key = Arrays.toString(id.to_channel_id());
                         ChannelMonitor res = test_mon_roundtrip(id, data.write());
                         assert monitors.put(key, res) == null;
                     }
-                    return Result_NoneChannelMonitorUpdateErrZ.ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
 
                 @Override
-                public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) {
+                public ChannelMonitorUpdateStatus update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) {
                     synchronized (monitors) {
                         String key = Arrays.toString(id.to_channel_id());
                         ChannelMonitor res = test_mon_roundtrip(id, data.write());
@@ -263,7 +267,7 @@ class HumanObjectPeerTestInstance {
                         // expose the JVM JIT bug where it finalize()s things still being called.
                         assert monitors.put(key, res) != null;
                     }
-                    return Result_NoneChannelMonitorUpdateErrZ.ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
             });
 
@@ -401,7 +405,7 @@ class HumanObjectPeerTestInstance {
                 assert node_secret.is_ok();
                 this.peer_manager = PeerManager.of(chan_manager.as_ChannelMessageHandler(), route_handler.as_RoutingMessageHandler(),
                         IgnoringMessageHandler.of().as_OnionMessageHandler(),
-                        ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res, System.currentTimeMillis() / 1000,
+                        ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res, (int)(System.currentTimeMillis() / 1000),
                         random_data, logger, this.custom_message_handler);
                 if (use_invoice_payer) {
                     this.payer = InvoicePayer.of(this.chan_manager.as_Payer(), Router.new_impl(new Router.RouterInterface() {
@@ -540,7 +544,7 @@ class HumanObjectPeerTestInstance {
                 assert node_secret.is_ok();
                 this.peer_manager = PeerManager.of(chan_manager.as_ChannelMessageHandler(), route_handler.as_RoutingMessageHandler(),
                         IgnoringMessageHandler.of().as_OnionMessageHandler(),
-                        ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res, System.currentTimeMillis() / 1000,
+                        ((Result_SecretKeyNoneZ.Result_SecretKeyNoneZ_OK)node_secret).res, (int)(System.currentTimeMillis() / 1000),
                         random_data, logger, this.custom_message_handler);
                 if (!break_cross_peer_refs && (use_manual_watch || use_km_wrapper)) {
                     // When we pass monitors[0] into chain_watch.watch_channel we create a reference from the new Peer to a
@@ -873,7 +877,7 @@ class HumanObjectPeerTestInstance {
         assert Arrays.equals(peer1_chans[0].get_channel_id(), funding.getTxId().getReversedBytes());
         assert Arrays.equals(peer2_chans[0].get_channel_id(), funding.getTxId().getReversedBytes());
 
-        Result_InvoiceSignOrCreationErrorZ invoice = UtilMethods.create_invoice_from_channelmanager(peer2.chan_manager, peer2.keys_interface, Currency.LDKCurrency_Bitcoin, Option_u64Z.some(10000000), "Invoice Description", 7200);
+        Result_InvoiceSignOrCreationErrorZ invoice = UtilMethods.create_invoice_from_channelmanager(peer2.chan_manager, peer2.keys_interface, peer2.logger, Currency.LDKCurrency_Bitcoin, Option_u64Z.some(10000000), "Invoice Description", 7200);
         assert invoice instanceof Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK;
         System.out.println("Got invoice: " + ((Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK) invoice).res.to_str());
 
@@ -913,7 +917,9 @@ class HumanObjectPeerTestInstance {
             byte[] hop_pubkey = new byte[33];
             hop_pubkey[0] = 3;
             hop_pubkey[1] = 42;
-            hops[0][0] = RouteHop.of(hop_pubkey, NodeFeatures.known(), 42, ChannelFeatures.known(), 100, 0);
+            NodeFeatures node_features = NodeFeatures.empty();
+            ChannelFeatures channel_features = ChannelFeatures.empty();
+            hops[0][0] = RouteHop.of(hop_pubkey, node_features, 42, channel_features, 100, 0);
             Route r2 = Route.of(hops, payee);
             payment_res = peer1.chan_manager.send_payment(r2, payment_hash, payment_secret);
             assert payment_res instanceof Result_PaymentIdPaymentSendFailureZ.Result_PaymentIdPaymentSendFailureZ_Err;
index 1cd1eb301ca014ed13cc4e01dcd951ff32570ee7..fd9fa7ef01ed836f6ab5ba42b32dd869decffac5 100644 (file)
@@ -94,8 +94,9 @@ public class ManualMsgHandlingPeerTest {
             }
 
             @Override
-            public void peer_connected(byte[] their_node_id, long msg) {
-
+            public long peer_connected(byte[] their_node_id, long msg) {
+                assert false;
+                return 0;
             }
 
             @Override
@@ -148,7 +149,7 @@ public class ManualMsgHandlingPeerTest {
                 return 0;
             }
 
-            @Override public void peer_connected(byte[] their_node_id, long init) { }
+            @Override public long peer_connected(byte[] their_node_id, long init) { assert false; return 0; }
 
             @Override
             public long handle_reply_channel_range(byte[] their_node_id, long msg) {
@@ -189,7 +190,7 @@ public class ManualMsgHandlingPeerTest {
         byte[] random_data = new byte[32];
         for (byte i = 0; i < 32; i++) { random_data[i] = i; our_node_secret[i] = (byte) (i ^ 0xff); }
 
-        long peer_manager = bindings.PeerManager_new(message_handler, our_node_secret, System.currentTimeMillis() / 1000,
+        long peer_manager = bindings.PeerManager_new(message_handler, our_node_secret, (int)(System.currentTimeMillis() / 1000),
                 random_data, logger,
                 bindings.IgnoringMessageHandler_as_CustomMessageHandler(ignoring_message_handler));
 
index 63a4e169569afc547f428c72259a9ed0a455756e..14dfa65e5b03eb36b6e5f256511fcc7c42cc4a86 100644 (file)
@@ -3,6 +3,7 @@ package org.ldk;
 import org.bitcoinj.core.*;
 import org.bitcoinj.script.Script;
 import org.junit.jupiter.api.Test;
+import org.ldk.enums.ChannelMonitorUpdateStatus;
 import org.ldk.enums.Network;
 import org.ldk.enums.Recipient;
 import org.ldk.impl.bindings;
@@ -57,16 +58,16 @@ public class PeerTest {
             this.monitors = new HashMap<>();
             this.watcher = new bindings.LDKWatch() {
                 @Override
-                public long watch_channel(long funding_txo, long monitor) {
+                public ChannelMonitorUpdateStatus watch_channel(long funding_txo, long monitor) {
                     synchronized (monitors) {
                         assert monitors.put(Arrays.toString(bindings.OutPoint_get_txid(funding_txo)), monitor) == null;
                     }
                     bindings.OutPoint_free(funding_txo);
-                    return bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
 
                 @Override
-                public long update_channel(long funding_txo, long update) {
+                public ChannelMonitorUpdateStatus update_channel(long funding_txo, long update) {
                     synchronized (monitors) {
                         String txid = Arrays.toString(bindings.OutPoint_get_txid(funding_txo));
                         assert monitors.containsKey(txid);
@@ -76,7 +77,7 @@ public class PeerTest {
                     }
                     bindings.OutPoint_free(funding_txo);
                     bindings.ChannelMonitorUpdate_free(update);
-                    return bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
+                    return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                 }
 
                 @Override
@@ -123,7 +124,7 @@ public class PeerTest {
             long node_id_result = bindings.KeysInterface_get_node_secret(keys_interface, Recipient.LDKRecipient_Node);
             assert bindings.CResult_SecretKeyNoneZ_is_ok(node_id_result);
             this.peer_manager = bindings.PeerManager_new(message_handler, bindings.CResult_SecretKeyNoneZ_get_ok(node_id_result),
-                    System.currentTimeMillis() / 1000, random_data, logger, this.custom_message_handler);
+                    (int)(System.currentTimeMillis() / 1000), random_data, logger, this.custom_message_handler);
             bindings.CResult_SecretKeyNoneZ_free(node_id_result);
         }
 
@@ -323,7 +324,9 @@ public class PeerTest {
         long scorer_interface = bindings.ProbabilisticScorer_as_Score(scorer);
 
         long no_u64 = bindings.COption_u64Z_none();
-        long invoice_features = bindings.InvoiceFeatures_known();
+        long invoice_features = bindings.InvoiceFeatures_empty();
+        bindings.InvoiceFeatures_set_payment_secret_required(invoice_features);
+        bindings.InvoiceFeatures_set_variable_length_onion_required(invoice_features);
         long payee = bindings.PaymentParameters_new(peer2.node_id, invoice_features, new long[0], no_u64, 6*24*14, (byte)1, (byte)1, new long[0]);
         bindings.InvoiceFeatures_free(invoice_features);
         bindings.COption_u64Z_free(no_u64);
index 654716d34ffd46a93d757b203445f11d617a6bbc..6b2129145677a1ef22d912ca1cc5a6628dc8d3ec 100644 (file)
@@ -179,17 +179,19 @@ static inline int32_t LDKCOption_NoneZ_to_js(LDKCOption_NoneZ val) {
                default: abort();
        }
 }
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_js(int32_t ord) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_js(int32_t ord) {
        switch (ord) {
-               case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
-               case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+               case 0: return LDKChannelMonitorUpdateStatus_Completed;
+               case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+               case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
        }
        abort();
 }
-static inline int32_t LDKChannelMonitorUpdateErr_to_js(LDKChannelMonitorUpdateErr val) {
+static inline int32_t LDKChannelMonitorUpdateStatus_to_js(LDKChannelMonitorUpdateStatus val) {
        switch (val) {
-               case LDKChannelMonitorUpdateErr_TemporaryFailure: return 0;
-               case LDKChannelMonitorUpdateErr_PermanentFailure: return 1;
+               case LDKChannelMonitorUpdateStatus_Completed: return 0;
+               case LDKChannelMonitorUpdateStatus_InProgress: return 1;
+               case LDKChannelMonitorUpdateStatus_PermanentFailure: return 2;
                default: abort();
        }
 }
@@ -518,6 +520,25 @@ void  __attribute__((export_name("TS_CResult_BlindedRouteNoneZ_get_err"))) TS_CR
        CResult_BlindedRouteNoneZ_get_err(owner_conv);
 }
 
+uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDecodeError_ty_from_ptr(uint64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKDecodeError_UnknownVersion: return 0;
+               case LDKDecodeError_UnknownRequiredFeature: return 1;
+               case LDKDecodeError_InvalidValue: return 2;
+               case LDKDecodeError_ShortRead: return 3;
+               case LDKDecodeError_BadLengthDescriptor: return 4;
+               case LDKDecodeError_Io: return 5;
+               case LDKDecodeError_UnsupportedCompression: return 6;
+               default: abort();
+       }
+}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_Io_get_io"))) TS_LDKDecodeError_Io_get_io(uint64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       assert(obj->tag == LDKDecodeError_Io);
+                       uint32_t io_conv = LDKIOError_to_js(obj->io);
+       return io_conv;
+}
 static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
        LDKBlindedRoute ret = *owner->contents.result;
        ret.is_owned = false;
@@ -533,16 +554,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_err"))) TS_CResult_BlindedRouteDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -561,16 +580,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_err"))) TS_CResult_BlindedHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -607,16 +624,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDe
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -677,16 +692,14 @@ uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -705,16 +718,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -771,16 +782,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -799,16 +808,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionP
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -827,16 +834,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDec
 }
 
 static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -855,16 +860,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDeco
 }
 
 static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -883,16 +886,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecod
 }
 
 static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -934,16 +935,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1013,16 +1012,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1069,16 +1066,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_err"))) TS_CResult_RouteHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1111,16 +1106,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_ok"))) TS
 }
 
 static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_err"))) TS_CResult_RouteDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1139,16 +1132,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get_err"))) TS_CResult_RouteParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1193,16 +1184,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_get_err"))) TS_CResult_PaymentParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1228,16 +1217,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_err"))) TS_CResult_RouteHintDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1256,16 +1243,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_err"))) TS_CResult_RouteHintHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1346,16 +1331,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1414,16 +1397,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1490,16 +1471,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeE
 }
 
 static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2062,16 +2041,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_err"))) TS_CResult_COption_EventZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2535,31 +2512,12 @@ static inline LDKCVec_TxidZ CVec_TxidZ_clone(const LDKCVec_TxidZ *orig) {
        }
        return ret;
 }
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-void  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(uint64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-uint32_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(uint64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKMonitorEvent_HTLCEvent: return 0;
                case LDKMonitorEvent_CommitmentTxConfirmed: return 1;
-               case LDKMonitorEvent_UpdateCompleted: return 2;
+               case LDKMonitorEvent_Completed: return 2;
                case LDKMonitorEvent_UpdateFailed: return 3;
                default: abort();
        }
@@ -2582,19 +2540,19 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_CommitmentTxConfirmed_ge
                        commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
        return commitment_tx_confirmed_ref;
 }
-uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo"))) TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(uint64_t ptr) {
+uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_txo"))) TS_LDKMonitorEvent_Completed_get_funding_txo(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
-       assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
-                       LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+       assert(obj->tag == LDKMonitorEvent_Completed);
+                       LDKOutPoint funding_txo_var = obj->completed.funding_txo;
                        uint64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
        return funding_txo_ref;
 }
-int64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id"))) TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(uint64_t ptr) {
+int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
-       assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
-                       int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
+       assert(obj->tag == LDKMonitorEvent_Completed);
+                       int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
        return monitor_update_id_conv;
 }
 uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateFailed_get_update_failed"))) TS_LDKMonitorEvent_UpdateFailed_get_update_failed(uint64_t ptr) {
@@ -2679,16 +2637,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2788,16 +2744,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2816,16 +2770,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_err"))) TS_CResult_InitFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2844,16 +2796,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2872,16 +2822,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2900,16 +2848,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2928,16 +2874,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2956,16 +2900,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_ok"))) T
 }
 
 static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) TS_CResult_NodeIdDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2982,16 +2924,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3191,16 +3131,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3219,16 +3157,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3247,16 +3183,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_err"))) TS_CResult_RoutingFeesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3366,16 +3300,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeError
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3394,16 +3326,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_err"))) TS_CResult_NodeAliasDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3422,16 +3352,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_err"))) TS_CResult_NodeInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3450,16 +3378,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_err"))) TS_CResult_NetworkGraphDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3500,16 +3426,14 @@ uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorD
 }
 
 static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3528,16 +3452,14 @@ uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDe
 }
 
 static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3554,16 +3476,14 @@ uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecode
 }
 
 static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3702,6 +3622,26 @@ void  __attribute__((export_name("TS_CResult_SecretKeyNoneZ_get_err"))) TS_CResu
        CResult_SecretKeyNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+int8_tArray  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_ok"))) TS_CResult_PublicKeyNoneZ_get_ok(uint64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+       memcpy(ret_arr->elems, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form, 33);
+       return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+void  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_err"))) TS_CResult_PublicKeyNoneZ_get_err(uint64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
 uint32_t __attribute__((export_name("TS_LDKCOption_ScalarZ_ty_from_ptr"))) TS_LDKCOption_ScalarZ_ty_from_ptr(uint64_t ptr) {
        LDKCOption_ScalarZ *obj = (LDKCOption_ScalarZ*)untag_ptr(ptr);
        switch(obj->tag) {
@@ -3923,6 +3863,20 @@ LDKCResult_SignatureNoneZ sign_closing_transaction_LDKBaseSign_jcall(const void*
        FREE(untag_ptr(ret));
        return ret_conv;
 }
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+       LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+       LDKTransaction anchor_tx_var = anchor_tx;
+       int8_tArray anchor_tx_arr = init_int8_tArray(anchor_tx_var.datalen, __LINE__);
+       memcpy(anchor_tx_arr->elems, anchor_tx_var.data, anchor_tx_var.datalen);
+       Transaction_free(anchor_tx_var);
+       uint32_t input_conv = input;
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)anchor_tx_arr, input_conv, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
 LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
        LDKUnsignedChannelAnnouncement msg_var = *msg;
@@ -3930,7 +3884,7 @@ LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSig
        msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 13, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 14, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
@@ -3944,7 +3898,7 @@ void ready_channel_LDKBaseSign_jcall(void* this_arg, const LDKChannelTransaction
        channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
        channel_parameters_ref = tag_ptr(channel_parameters_var.inner, channel_parameters_var.is_owned);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 14, channel_parameters_ref, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 15, channel_parameters_ref, 0, 0, 0, 0, 0);
 }
 static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
@@ -3973,6 +3927,7 @@ static inline LDKBaseSign LDKBaseSign_init (JSValue o, uint64_t pubkeys) {
                .sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
                .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
                .sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+               .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
                .sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
                .ready_channel = ready_channel_LDKBaseSign_jcall,
                .free = LDKBaseSign_JCalls_free,
@@ -4175,6 +4130,20 @@ uint64_t  __attribute__((export_name("TS_BaseSign_sign_closing_transaction"))) T
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_BaseSign_sign_holder_anchor_input"))) TS_BaseSign_sign_holder_anchor_input(uint64_t this_arg, int8_tArray anchor_tx, uint32_t input) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+       LDKTransaction anchor_tx_ref;
+       anchor_tx_ref.datalen = anchor_tx->arr_len;
+       anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(anchor_tx_ref.data, anchor_tx->elems, anchor_tx_ref.datalen); FREE(anchor_tx);
+       anchor_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_BaseSign_sign_channel_announcement"))) TS_BaseSign_sign_channel_announcement(uint64_t this_arg, uint64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -4230,7 +4199,7 @@ static void LDKSign_JCalls_free(void* this_arg) {
 }
 LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
        LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -4290,16 +4259,14 @@ uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_err"))) TS_CResult_SignDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4376,16 +4343,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_err"))) TS_CResult_InMemorySignerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4438,7 +4403,7 @@ uint32_t __attribute__((export_name("TS_LDKAPIError_ty_from_ptr"))) TS_LDKAPIErr
                case LDKAPIError_FeeRateTooHigh: return 1;
                case LDKAPIError_RouteError: return 2;
                case LDKAPIError_ChannelUnavailable: return 3;
-               case LDKAPIError_MonitorUpdateFailed: return 4;
+               case LDKAPIError_MonitorUpdateInProgress: return 4;
                case LDKAPIError_IncompatibleShutdownScript: return 5;
                default: abort();
        }
@@ -4860,16 +4825,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecod
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4888,16 +4851,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4916,16 +4877,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4944,16 +4903,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4974,7 +4931,7 @@ static void LDKWatch_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        LDKOutPoint funding_txo_var = funding_txo;
        uint64_t funding_txo_ref = 0;
@@ -4984,14 +4941,11 @@ LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void*
        uint64_t monitor_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
        monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
-       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 16, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        LDKOutPoint funding_txo_var = funding_txo;
        uint64_t funding_txo_ref = 0;
@@ -5001,16 +4955,13 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void
        uint64_t update_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
        update_ref = tag_ptr(update_var.inner, update_var.is_owned);
-       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, update_ref, 0, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 18, funding_txo_ref, update_ref, 0, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
 LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, 0, 0, 0, 0, 0, 0);
        LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -5052,7 +5003,7 @@ uint64_t  __attribute__((export_name("TS_LDKWatch_new"))) TS_LDKWatch_new(JSValu
        *res_ptr = LDKWatch_init(o);
        return tag_ptr(res_ptr, true);
 }
-uint64_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
+uint32_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -5066,12 +5017,11 @@ uint64_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_
        monitor_conv.is_owned = ptr_is_owned(monitor);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
        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 tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+       return ret_conv;
 }
 
-uint64_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
+uint32_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -5085,9 +5035,8 @@ uint64_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_updat
        update_conv.is_owned = ptr_is_owned(update);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
        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 tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+       return ret_conv;
 }
 
 uint64_tArray  __attribute__((export_name("TS_Watch_release_pending_monitor_events"))) TS_Watch_release_pending_monitor_events(uint64_t this_arg) {
@@ -5124,7 +5073,7 @@ void broadcast_transaction_LDKBroadcasterInterface_jcall(const void* this_arg, L
        int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
        memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
        Transaction_free(tx_var);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
 }
 static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
        LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
@@ -5172,13 +5121,23 @@ static void LDKKeysInterface_JCalls_free(void* this_arg) {
 LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        uint32_t recipient_conv = LDKRecipient_to_js(recipient);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, recipient_conv, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, recipient_conv, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
        FREE(untag_ptr(ret));
        return ret_conv;
 }
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       uint32_t recipient_conv = LDKRecipient_to_js(recipient);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, recipient_conv, 0, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
 LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        uint32_t recipient_conv = LDKRecipient_to_js(recipient);
@@ -5187,7 +5146,7 @@ LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, L
        LDKCOption_ScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_ScalarZ), "LDKCOption_ScalarZ");
        *tweak_copy = tweak;
        uint64_t tweak_ref = tag_ptr(tweak_copy, true);
-       uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 21, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 23, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SharedSecretNoneZ ret_conv = *(LDKCResult_SharedSecretNoneZ*)(ret_ptr);
@@ -5196,7 +5155,7 @@ LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, L
 }
 LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -5205,7 +5164,7 @@ LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg)
 }
 LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 23, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
        LDKShutdownScript ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -5216,7 +5175,7 @@ LDKSign get_channel_signer_LDKKeysInterface_jcall(const void* this_arg, bool inb
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        jboolean inbound_conv = inbound;
        int64_t channel_value_satoshis_conv = channel_value_satoshis;
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 24, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 26, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKSign ret_conv = *(LDKSign*)(ret_ptr);
@@ -5225,7 +5184,7 @@ LDKSign get_channel_signer_LDKKeysInterface_jcall(const void* this_arg, bool inb
 }
 LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
        LDKThirtyTwoBytes ret_ref;
        CHECK(ret->arr_len == 32);
        memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
@@ -5236,7 +5195,7 @@ LDKCResult_SignDecodeErrorZ read_chan_signer_LDKKeysInterface_jcall(const void*
        LDKu8slice reader_var = reader;
        int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
        memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
@@ -5259,7 +5218,7 @@ LDKCResult_RecoverableSignatureNoneZ sign_invoice_LDKKeysInterface_jcall(const v
        
        FREE(invoice_data_var.data);
        uint32_t receipient_conv = LDKRecipient_to_js(receipient);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
@@ -5268,7 +5227,7 @@ LDKCResult_RecoverableSignatureNoneZ sign_invoice_LDKKeysInterface_jcall(const v
 }
 LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
        LDKThirtyTwoBytes ret_ref;
        CHECK(ret->arr_len == 32);
        memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
@@ -5286,6 +5245,7 @@ static inline LDKKeysInterface LDKKeysInterface_init (JSValue o) {
        LDKKeysInterface ret = {
                .this_arg = (void*) calls,
                .get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+               .get_node_id = get_node_id_LDKKeysInterface_jcall,
                .ecdh = ecdh_LDKKeysInterface_jcall,
                .get_destination_script = get_destination_script_LDKKeysInterface_jcall,
                .get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
@@ -5313,6 +5273,16 @@ uint64_t  __attribute__((export_name("TS_KeysInterface_get_node_secret"))) TS_Ke
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_KeysInterface_get_node_id"))) TS_KeysInterface_get_node_id(uint64_t this_arg, uint32_t recipient) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+       LDKRecipient recipient_conv = LDKRecipient_from_js(recipient);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_KeysInterface_ecdh"))) TS_KeysInterface_ecdh(uint64_t this_arg, uint32_t recipient, int8_tArray other_key, uint64_t tweak) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -5432,7 +5402,7 @@ static void LDKFeeEstimator_JCalls_free(void* this_arg) {
 uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_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_uuuuuu(j_calls->instance_ptr, 29, confirmation_target_conv, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, confirmation_target_conv, 0, 0, 0, 0, 0);
 }
 static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
        LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
@@ -5499,16 +5469,14 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManager
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5527,16 +5495,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_err"))) TS_CResult_ChannelConfigDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5555,16 +5521,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_err"))) TS_CResult_OutPointDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5580,17 +5544,17 @@ static void LDKType_JCalls_free(void* this_arg) {
 }
 uint16_t type_id_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
 }
 LDKStr debug_str_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
+       jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, 0, 0, 0, 0, 0, 0);
        LDKStr ret_conv = str_ref_to_owned_c(ret);
        return ret_conv;
 }
 LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -5678,16 +5642,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_err"))) TS_CResult_COption_TypeZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5760,16 +5722,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6142,16 +6102,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeError
 }
 
 static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6182,16 +6140,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6210,16 +6166,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6497,16 +6451,14 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitor
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6537,6 +6489,110 @@ static inline LDKCVec_C2Tuple_PublicKeyTypeZZ CVec_C2Tuple_PublicKeyTypeZZ_clone
        }
        return ret;
 }
+typedef struct LDKCustomOnionMessageContents_JCalls {
+       atomic_size_t refcnt;
+       uint32_t instance_ptr;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               FREE(j_calls);
+       }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, 0, 0, 0, 0, 0, 0);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = ret->arr_len;
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(ret_ref.data, ret->elems, ret_ref.datalen); FREE(ret);
+       return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JSValue o) {
+       LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       calls->instance_ptr = o;
+
+       LDKCustomOnionMessageContents ret = {
+               .this_arg = (void*) calls,
+               .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+               .write = write_LDKCustomOnionMessageContents_jcall,
+               .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+               .free = LDKCustomOnionMessageContents_JCalls_free,
+       };
+       return ret;
+}
+uint64_t  __attribute__((export_name("TS_LDKCustomOnionMessageContents_new"))) TS_LDKCustomOnionMessageContents_new(JSValue o) {
+       LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *res_ptr = LDKCustomOnionMessageContents_init(o);
+       return tag_ptr(res_ptr, true);
+}
+int64_t  __attribute__((export_name("TS_CustomOnionMessageContents_tlv_type"))) TS_CustomOnionMessageContents_tlv_type(uint64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+       return ret_conv;
+}
+
+int8_tArray  __attribute__((export_name("TS_CustomOnionMessageContents_write"))) TS_CustomOnionMessageContents_write(uint64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+       int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+       memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+uint32_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_CustomOnionMessageContentsZ_Some: return 0;
+               case LDKCOption_CustomOnionMessageContentsZ_None: return 1;
+               default: abort();
+       }
+}
+uint64_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(uint64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       assert(obj->tag == LDKCOption_CustomOnionMessageContentsZ_Some);
+                       LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+                       *some_ret = CustomOnionMessageContents_clone(&obj->some);
+       return tag_ptr(some_ret, true);
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 uint32_t __attribute__((export_name("TS_LDKCOption_NetAddressZ_ty_from_ptr"))) TS_LDKCOption_NetAddressZ_ty_from_ptr(uint64_t ptr) {
        LDKCOption_NetAddressZ *obj = (LDKCOption_NetAddressZ*)untag_ptr(ptr);
        switch(obj->tag) {
@@ -6632,7 +6688,8 @@ uint32_t __attribute__((export_name("TS_LDKSendError_ty_from_ptr"))) TS_LDKSendE
                case LDKSendError_TooBigPacket: return 1;
                case LDKSendError_TooFewBlindedHops: return 2;
                case LDKSendError_InvalidFirstHop: return 3;
-               case LDKSendError_BufferFull: return 4;
+               case LDKSendError_InvalidMessage: return 4;
+               case LDKSendError_BufferFull: return 5;
                default: abort();
        }
 }
@@ -6663,6 +6720,51 @@ uint64_t  __attribute__((export_name("TS_CResult_NoneSendErrorZ_get_err"))) TS_C
        return ret_ref;
 }
 
+uint32_t __attribute__((export_name("TS_LDKGraphSyncError_ty_from_ptr"))) TS_LDKGraphSyncError_ty_from_ptr(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKGraphSyncError_DecodeError: return 0;
+               case LDKGraphSyncError_LightningError: return 1;
+               default: abort();
+       }
+}
+uint64_t __attribute__((export_name("TS_LDKGraphSyncError_DecodeError_get_decode_error"))) TS_LDKGraphSyncError_DecodeError_get_decode_error(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       assert(obj->tag == LDKGraphSyncError_DecodeError);
+                       uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
+       return decode_error_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKGraphSyncError_LightningError_get_lightning_error"))) TS_LDKGraphSyncError_LightningError_get_lightning_error(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       assert(obj->tag == LDKGraphSyncError_LightningError);
+                       LDKLightningError lightning_error_var = obj->lightning_error;
+                       uint64_t lightning_error_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(lightning_error_var);
+                       lightning_error_ref = tag_ptr(lightning_error_var.inner, false);
+       return lightning_error_ref;
+}
+static inline uint32_t CResult_u32GraphSyncErrorZ_get_ok(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+int32_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_get_ok"))) TS_CResult_u32GraphSyncErrorZ_get_ok(uint64_t owner) {
+       LDKCResult_u32GraphSyncErrorZ* owner_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(owner);
+       int32_t ret_conv = CResult_u32GraphSyncErrorZ_get_ok(owner_conv);
+       return ret_conv;
+}
+
+static inline struct LDKGraphSyncError CResult_u32GraphSyncErrorZ_get_err(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return GraphSyncError_clone(&*owner->contents.err);
+}
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_get_err"))) TS_CResult_u32GraphSyncErrorZ_get_err(uint64_t owner) {
+       LDKCResult_u32GraphSyncErrorZ* owner_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(owner);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = CResult_u32GraphSyncErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline void CResult_NoneErrorZ_get_ok(LDKCResult_NoneErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
@@ -6695,16 +6797,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_err"))) TS_CResult_NetAddressDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6751,16 +6851,14 @@ uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_err"))) TS_CResult_AcceptChannelDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6779,16 +6877,14 @@ uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6807,16 +6903,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_get_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6835,16 +6929,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6863,16 +6955,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6891,16 +6981,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_ge
 }
 
 static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_get_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6919,16 +7007,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_err"))) TS_CResult_FundingCreatedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6947,16 +7033,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_err"))) TS_CResult_FundingSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6975,16 +7059,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_err"))) TS_CResult_ChannelReadyDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7003,16 +7085,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_err"))) TS_CResult_InitDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7031,16 +7111,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_err"))) TS_CResult_OpenChannelDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7059,16 +7137,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7087,16 +7163,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_err"))) TS_CResult_ShutdownDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7115,16 +7189,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7143,16 +7215,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7171,16 +7241,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_err"))) TS_CResult_UpdateFeeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7199,16 +7267,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7227,16 +7293,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7255,16 +7319,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_err"))) TS_CResult_OnionMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7283,16 +7345,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_err"))) TS_CResult_PingDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7311,16 +7371,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_err"))) TS_CResult_PongDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7339,16 +7397,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDeco
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7367,16 +7423,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7395,16 +7449,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7423,16 +7475,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7451,16 +7501,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_err"))) TS_CResult_ErrorMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7479,16 +7527,14 @@ uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_err"))) TS_CResult_WarningMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7507,16 +7553,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeE
 }
 
 static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7535,16 +7579,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_ge
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7563,16 +7605,14 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeError
 }
 
 static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7591,16 +7631,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7619,16 +7657,14 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_get_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7647,16 +7683,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7675,16 +7709,14 @@ uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7745,7 +7777,7 @@ void register_tx_LDKFilter_jcall(const void* this_arg, const uint8_t (* txid)[32
        LDKu8slice script_pubkey_var = script_pubkey;
        int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
        memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 37, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
 }
 void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
@@ -7753,7 +7785,7 @@ void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput outp
        uint64_t output_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(output_var);
        output_ref = tag_ptr(output_var.inner, output_var.is_owned);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 34, output_ref, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 38, output_ref, 0, 0, 0, 0, 0);
 }
 static void LDKFilter_JCalls_cloned(LDKFilter* new_obj) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) new_obj->this_arg;
@@ -7866,7 +7898,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
 }
 LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
        LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, 0, 0, 0, 0, 0, 0);
        LDKCVec_MessageSendEventZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -7939,7 +7971,7 @@ LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageProvider_jcall(const
        LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
        int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 40, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
        LDKOnionMessage ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -7996,7 +8028,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, const LDKEvent * e
        LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
        *ret_event = Event_clone(event);
        uint64_t ref_event = tag_ptr(ret_event, true);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 37, ref_event, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 41, ref_event, 0, 0, 0, 0, 0);
 }
 static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
        LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
@@ -8041,7 +8073,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve
        LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
        LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
        *handler_ret = handler;
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 38, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 42, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
 }
 static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
        LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
@@ -8105,7 +8137,7 @@ uint64_t channel_penalty_msat_LDKScore_jcall(const void* this_arg, uint64_t shor
        uint64_t usage_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(usage_var);
        usage_ref = tag_ptr(usage_var.inner, usage_var.is_owned);
-       return js_invoke_function_bbbbuu(j_calls->instance_ptr, 39, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
+       return js_invoke_function_bbbbuu(j_calls->instance_ptr, 43, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
 }
 void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8123,7 +8155,7 @@ void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path,
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 44, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8140,7 +8172,7 @@ void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ pa
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8158,7 +8190,7 @@ void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 42, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 46, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8175,11 +8207,11 @@ void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -8354,7 +8386,7 @@ static void LDKLockableScore_JCalls_free(void* this_arg) {
 }
 LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
        LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKScore ret_conv = *(LDKScore*)(ret_ptr);
@@ -8408,7 +8440,7 @@ static void LDKWriteableScore_JCalls_free(void* this_arg) {
 }
 LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
        LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -8467,7 +8499,7 @@ LDKCResult_NoneErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, c
        // WARNING: we may need a move here but no clone is available for LDKChannelManager
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
        channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 47, channel_manager_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 51, channel_manager_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8481,7 +8513,7 @@ LDKCResult_NoneErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, con
        // WARNING: we may need a move here but no clone is available for LDKNetworkGraph
        CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
        network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 48, network_graph_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 52, network_graph_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8492,7 +8524,7 @@ LDKCResult_NoneErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, co
        LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
        // WARNING: This object doesn't live past this scope, needs clone!
        uint64_t ret_scorer = tag_ptr(scorer, false);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 49, ret_scorer, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 53, ret_scorer, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8574,7 +8606,7 @@ static void LDKFutureCallback_JCalls_free(void* this_arg) {
 }
 void call_LDKFutureCallback_jcall(const void* this_arg) {
        LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, 0, 0, 0, 0, 0, 0);
 }
 static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
        LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
@@ -8630,7 +8662,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_
        
        FREE(txdata_var.data);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
 }
 void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
@@ -8638,14 +8670,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin
        int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
        memcpy(block_arr->elems, block_var.data, block_var.datalen);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
 }
 void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
        int8_tArray header_arr = init_int8_tArray(80, __LINE__);
        memcpy(header_arr->elems, *header, 80);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
 }
 static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
@@ -8745,24 +8777,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        
        FREE(txdata_var.data);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
 }
 void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
        int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
        memcpy(txid_arr->elems, *txid, 32);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
 }
 void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
        int8_tArray header_arr = init_int8_tArray(80, __LINE__);
        memcpy(header_arr->elems, *header, 80);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
 }
 LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
-       ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, 0, 0, 0, 0, 0, 0);
+       ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0);
        LDKCVec_TxidZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -8881,7 +8913,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        LDKOutPoint channel_id_var = channel_id;
        uint64_t channel_id_ref = 0;
@@ -8896,14 +8928,11 @@ LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(con
        uint64_t update_id_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
-       uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 62, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        LDKOutPoint channel_id_var = channel_id;
        uint64_t channel_id_ref = 0;
@@ -8923,11 +8952,8 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcal
        uint64_t update_id_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
-       uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 59, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 63, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
 static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
@@ -8952,7 +8978,7 @@ uint64_t  __attribute__((export_name("TS_LDKPersist_new"))) TS_LDKPersist_new(JS
        *res_ptr = LDKPersist_init(o);
        return tag_ptr(res_ptr, true);
 }
-uint64_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
+uint32_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -8971,12 +8997,11 @@ uint64_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Pers
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
-uint64_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
+uint32_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -9000,9 +9025,8 @@ uint64_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
 typedef struct LDKChannelMessageHandler_JCalls {
@@ -9029,7 +9053,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD
        msg_var = OpenChannel_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9044,7 +9068,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = AcceptChannel_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9055,7 +9079,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = FundingCreated_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9066,7 +9090,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = FundingSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9077,7 +9101,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L
        msg_var = ChannelReady_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9093,7 +9117,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub
        msg_var = Shutdown_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9104,7 +9128,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = ClosingSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9115,7 +9139,7 @@ void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = UpdateAddHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9126,7 +9150,7 @@ void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_
        msg_var = UpdateFulfillHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9137,7 +9161,7 @@ void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg
        msg_var = UpdateFailHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9148,7 +9172,7 @@ void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void
        msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9159,7 +9183,7 @@ void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_ar
        msg_var = CommitmentSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9170,7 +9194,7 @@ void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = RevokeAndACK_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9181,7 +9205,7 @@ void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKP
        msg_var = UpdateFee_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9192,16 +9216,16 @@ void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* t
        msg_var = AnnouncementSignatures_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void peer_disconnected_LDKChannelMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
        jboolean no_connection_possible_conv = no_connection_possible;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
 }
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -9210,7 +9234,12 @@ void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPubl
        msg_var = Init_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9221,7 +9250,7 @@ void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_
        msg_var = ChannelReestablish_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9232,7 +9261,7 @@ void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = ChannelUpdate_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9243,11 +9272,11 @@ void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublic
        msg_var = ErrorMessage_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9258,7 +9287,7 @@ LDKInitFeatures provided_init_features_LDKChannelMessageHandler_jcall(const void
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9560,7 +9589,7 @@ void  __attribute__((export_name("TS_ChannelMessageHandler_peer_disconnected")))
        (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
 
-void  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+uint64_t  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
@@ -9572,7 +9601,9 @@ void  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS
        msg_conv.is_owned = ptr_is_owned(msg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
        msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 void  __attribute__((export_name("TS_ChannelMessageHandler_handle_channel_reestablish"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
@@ -9663,7 +9694,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler
        msg_var = NodeAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 82, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 86, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9677,7 +9708,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand
        msg_var = ChannelAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 83, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 87, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9691,7 +9722,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc
        msg_var = ChannelUpdate_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 84, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 88, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9701,7 +9732,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc
 LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int64_t starting_point_conv = starting_point;
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 85, starting_point_conv, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 89, starting_point_conv, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
@@ -9712,14 +9743,14 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
        memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
        LDKNodeAnnouncement ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
        return ret_conv;
 }
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -9728,7 +9759,12 @@ void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPubl
        init_var = Init_clone(&init_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
@@ -9738,7 +9774,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9753,7 +9789,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9768,7 +9804,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9783,7 +9819,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9792,7 +9828,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH
 }
 LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9803,7 +9839,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9911,7 +9947,7 @@ uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_get_next_node_ann
        return ret_ref;
 }
 
-void  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
@@ -9923,7 +9959,9 @@ void  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_handle_reply_channel_range"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
@@ -10039,9 +10077,9 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK
        msg_var = OnionMessage_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -10050,18 +10088,23 @@ void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublic
        init_var = Init_clone(&init_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
        jboolean no_connection_possible_conv = no_connection_possible;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
 }
 LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -10072,7 +10115,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void*
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -10122,7 +10165,7 @@ void  __attribute__((export_name("TS_OnionMessageHandler_handle_onion_message"))
        (this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
 }
 
-void  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
@@ -10134,7 +10177,9 @@ void  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_O
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 void  __attribute__((export_name("TS_OnionMessageHandler_peer_disconnected"))) TS_OnionMessageHandler_peer_disconnected(uint64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
@@ -10188,7 +10233,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi
        LDKu8slice buffer_var = buffer;
        int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
        memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
@@ -10246,7 +10291,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca
        *msg_ret = msg;
        int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 100, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -10255,7 +10300,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca
 }
 LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
        LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -10336,6 +10381,84 @@ uint64_tArray  __attribute__((export_name("TS_CustomMessageHandler_get_and_clear
        return ret_arr;
 }
 
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       uint32_t instance_ptr;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               FREE(j_calls);
+       }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *msg_ret = msg;
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 106, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       int64_t message_type_conv = message_type;
+       LDKu8slice buffer_var = buffer;
+       int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
+       memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 107, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JSValue o) {
+       LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       calls->instance_ptr = o;
+
+       LDKCustomOnionMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .free = LDKCustomOnionMessageHandler_JCalls_free,
+       };
+       return ret;
+}
+uint64_t  __attribute__((export_name("TS_LDKCustomOnionMessageHandler_new"))) TS_LDKCustomOnionMessageHandler_new(JSValue o) {
+       LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *res_ptr = LDKCustomOnionMessageHandler_init(o);
+       return tag_ptr(res_ptr, true);
+}
+void  __attribute__((export_name("TS_CustomOnionMessageHandler_handle_custom_message"))) TS_CustomOnionMessageHandler_handle_custom_message(uint64_t this_arg, uint64_t msg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
+       (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_CustomOnionMessageHandler_read_custom_message"))) TS_CustomOnionMessageHandler_read_custom_message(uint64_t this_arg, int64_t message_type, int8_tArray buffer) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       LDKu8slice buffer_ref;
+       buffer_ref.datalen = buffer->arr_len;
+       buffer_ref.data = buffer->elems;
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+       FREE(buffer);
+       return tag_ptr(ret_conv, true);
+}
+
 typedef struct LDKSocketDescriptor_JCalls {
        atomic_size_t refcnt;
        uint32_t instance_ptr;
@@ -10352,21 +10475,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b
        int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
        memcpy(data_arr->elems, data_var.data, data_var.datalen);
        jboolean resume_read_conv = resume_read;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 108, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
 }
 void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, 0, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 109, 0, 0, 0, 0, 0, 0);
 }
 bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
        *other_arg_clone = SocketDescriptor_clone(other_arg);
-       return js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
+       return js_invoke_function_buuuuu(j_calls->instance_ptr, 110, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
 }
 uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, 0, 0, 0, 0, 0, 0);
 }
 static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
@@ -10528,7 +10651,7 @@ static void LDKPayer_JCalls_free(void* this_arg) {
 }
 LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 106, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 112, 0, 0, 0, 0, 0, 0);
        LDKPublicKey ret_ref;
        CHECK(ret->arr_len == 33);
        memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
@@ -10536,7 +10659,7 @@ LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
 }
 LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 107, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 113, 0, 0, 0, 0, 0, 0);
        LDKCVec_ChannelDetailsZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -10566,7 +10689,7 @@ LDKCResult_PaymentIdPaymentSendFailureZ send_payment_LDKPayer_jcall(const void*
        memcpy(payment_hash_arr->elems, payment_hash.data, 32);
        int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_secret_arr->elems, payment_secret.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 108, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 114, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
@@ -10582,7 +10705,7 @@ LDKCResult_PaymentIdPaymentSendFailureZ send_spontaneous_payment_LDKPayer_jcall(
        route_ref = tag_ptr(route_var.inner, route_var.is_owned);
        int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 109, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 115, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
@@ -10598,7 +10721,7 @@ LDKCResult_NonePaymentSendFailureZ retry_payment_LDKPayer_jcall(const void* this
        route_ref = tag_ptr(route_var.inner, route_var.is_owned);
        int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_id_arr->elems, payment_id.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 110, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 116, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
@@ -10609,7 +10732,7 @@ void abandon_payment_LDKPayer_jcall(const void* this_arg, LDKThirtyTwoBytes paym
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
        int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_id_arr->elems, payment_id.data, 32);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
 }
 static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
@@ -10770,7 +10893,7 @@ LDKCResult_RouteLightningErrorZ find_route_LDKRouter_jcall(const void* this_arg,
        uint64_t inflight_htlcs_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
        inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 112, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
+       uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 118, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
@@ -10793,7 +10916,7 @@ void notify_payment_path_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_Ro
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 113, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 119, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10810,7 +10933,7 @@ void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVe
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 114, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 120, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10827,7 +10950,7 @@ void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCV
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 115, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 121, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10845,7 +10968,7 @@ void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_R
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 116, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 122, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
@@ -11198,11 +11321,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_err"))) TS_CResult_BlindedRouteDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
        *ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11236,11 +11358,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_err"))) TS_CResult_BlindedHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
        *ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11318,11 +11439,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
        *ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11471,11 +11591,10 @@ uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
        *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11526,11 +11645,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
        *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11675,11 +11793,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
        *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11745,11 +11862,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionP
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11800,11 +11916,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDec
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11874,11 +11989,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDeco
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11929,11 +12043,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecod
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12017,11 +12130,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12165,11 +12277,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
        *ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12275,11 +12386,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_err"))) TS_CResult_RouteHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
        *ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12382,11 +12492,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_ok"))) TS_CRe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_err"))) TS_CResult_RouteDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
        *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12437,11 +12546,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_err"))) TS_CResult_RouteParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
        *ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12571,11 +12679,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_err"))) TS_CResult_PaymentParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
        *ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12646,11 +12753,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_err"))) TS_CResult_RouteHintDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
        *ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12701,11 +12807,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_err"))) TS_CResult_RouteHintHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
        *ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12830,11 +12935,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
        *ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12931,11 +13035,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
        *ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13032,11 +13135,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeE
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
        *ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13200,11 +13302,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_err"))) TS_CResult_COption_EventZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
        *ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13390,52 +13491,6 @@ void  __attribute__((export_name("TS_CVec_TxidZ_free"))) TS_CVec_TxidZ_free(ptrA
        CVec_TxidZ_free(_res_constr);
 }
 
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_ok() {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
-       return tag_ptr(ret_conv, true);
-}
-
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_err(uint32_t e) {
-       LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_js(e);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-jboolean  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(uint64_t o) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-void  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_free"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-int64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(uint64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint64_t orig) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(orig);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 void  __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_MonitorEventZ_free(uint64_tArray _res) {
        LDKCVec_MonitorEventZ _res_constr;
        _res_constr.datalen = _res->arr_len;
@@ -13545,11 +13600,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
        *ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13701,11 +13755,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
        *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13738,11 +13791,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_err"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
        *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13793,11 +13845,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13848,11 +13899,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
        *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13903,11 +13953,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
        *ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13958,11 +14007,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14013,11 +14061,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_ok"))) TS_CR
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_err"))) TS_CResult_NodeIdDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
        *ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14067,11 +14114,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
        *ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14347,11 +14393,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14402,11 +14447,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_err"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14457,11 +14501,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_err"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
        *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14532,11 +14575,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14587,11 +14629,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_err"))) TS_CResult_NodeAliasDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
        *ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14642,11 +14683,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_err"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
        *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14698,11 +14738,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_err"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14794,11 +14833,10 @@ uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorD
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14849,11 +14887,10 @@ uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14903,11 +14940,10 @@ uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecode
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15249,6 +15285,54 @@ uint64_t  __attribute__((export_name("TS_CResult_SecretKeyNoneZ_clone"))) TS_CRe
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_ok"))) TS_CResult_PublicKeyNoneZ_ok(int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK(o->arr_len == 33);
+       memcpy(o_ref.compressed_form, o->elems, 33); FREE(o);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_err"))) TS_CResult_PublicKeyNoneZ_err() {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_is_ok"))) TS_CResult_PublicKeyNoneZ_is_ok(uint64_t o) {
+       LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_free"))) TS_CResult_PublicKeyNoneZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+int64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone_ptr"))) TS_CResult_PublicKeyNoneZ_clone_ptr(uint64_t arg) {
+       LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone"))) TS_CResult_PublicKeyNoneZ_clone(uint64_t orig) {
+       LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_COption_ScalarZ_some"))) TS_COption_ScalarZ_some(uint64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -15338,11 +15422,10 @@ uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_err"))) TS_CResult_SignDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
        *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15547,11 +15630,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_err"))) TS_CResult_InMemorySignerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
        *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16361,11 +16443,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecod
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
        *ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16416,11 +16497,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
        *ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16471,11 +16551,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
        *ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16526,11 +16605,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
        *ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16624,11 +16702,10 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManager
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16661,11 +16738,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_err"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
        *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16716,11 +16792,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_err"))) TS_CResult_OutPointDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
        *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16820,11 +16895,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_err"))) TS_CResult_COption_TypeZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
        *ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16928,11 +17002,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
        *ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17537,11 +17610,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17638,11 +17710,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
        *ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17693,11 +17764,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
        *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18149,11 +18219,10 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitor
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18255,6 +18324,109 @@ void  __attribute__((export_name("TS_CVec_C2Tuple_PublicKeyTypeZZ_free"))) TS_CV
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
 
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_some"))) TS_COption_CustomOnionMessageContentsZ_some(uint64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+       if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_none"))) TS_COption_CustomOnionMessageContentsZ_none() {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_none();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+void  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_free"))) TS_COption_CustomOnionMessageContentsZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+int64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone_ptr"))) TS_COption_CustomOnionMessageContentsZ_clone_ptr(uint64_t arg) {
+       LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone"))) TS_COption_CustomOnionMessageContentsZ_clone(uint64_t orig) {
+       LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+       o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+int64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_COption_NetAddressZ_some"))) TS_COption_NetAddressZ_some(uint64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -18487,6 +18659,37 @@ void  __attribute__((export_name("TS_CResult_NoneSendErrorZ_free"))) TS_CResult_
        CResult_NoneSendErrorZ_free(_res_conv);
 }
 
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_ok"))) TS_CResult_u32GraphSyncErrorZ_ok(int32_t o) {
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = CResult_u32GraphSyncErrorZ_ok(o);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_err"))) TS_CResult_u32GraphSyncErrorZ_err(uint64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKGraphSyncError e_conv = *(LDKGraphSyncError*)(e_ptr);
+       e_conv = GraphSyncError_clone((LDKGraphSyncError*)untag_ptr(e));
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = CResult_u32GraphSyncErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_is_ok"))) TS_CResult_u32GraphSyncErrorZ_is_ok(uint64_t o) {
+       LDKCResult_u32GraphSyncErrorZ* o_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_u32GraphSyncErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_free"))) TS_CResult_u32GraphSyncErrorZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_u32GraphSyncErrorZ _res_conv = *(LDKCResult_u32GraphSyncErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_u32GraphSyncErrorZ_free(_res_conv);
+}
+
 uint64_t  __attribute__((export_name("TS_CResult_NoneErrorZ_ok"))) TS_CResult_NoneErrorZ_ok() {
        LDKCResult_NoneErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneErrorZ), "LDKCResult_NoneErrorZ");
        *ret_conv = CResult_NoneErrorZ_ok();
@@ -18544,11 +18747,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_err"))) TS_CResult_NetAddressDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
        *ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18679,11 +18881,10 @@ uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_err"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
        *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18734,11 +18935,10 @@ uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
        *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18789,11 +18989,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
        *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18844,11 +19043,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_err"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18899,11 +19097,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18954,11 +19151,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_ok
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
        *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19009,11 +19205,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_err"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
        *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19064,11 +19259,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_err"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
        *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19119,11 +19313,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_err"))) TS_CResult_ChannelReadyDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
        *ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19174,11 +19367,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_err"))) TS_CResult_InitDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
        *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19229,11 +19421,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_err"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
        *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19284,11 +19475,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
        *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19339,11 +19529,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_err"))) TS_CResult_ShutdownDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
        *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19394,11 +19583,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19449,11 +19637,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeEr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19504,11 +19691,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_err"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
        *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19559,11 +19745,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19614,11 +19799,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19669,11 +19853,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_err"))) TS_CResult_OnionMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
        *ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19724,11 +19907,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_err"))) TS_CResult_PingDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
        *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19779,11 +19961,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_err"))) TS_CResult_PongDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
        *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19834,11 +20015,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDeco
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19889,11 +20069,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19944,11 +20123,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19999,11 +20177,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20054,11 +20231,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_err"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
        *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20109,11 +20285,10 @@ uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_err"))) TS_CResult_WarningMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
        *ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20164,11 +20339,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeE
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20219,11 +20393,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_ok
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20274,11 +20447,10 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
        *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20329,11 +20501,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeEr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
        *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20384,11 +20555,10 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
        *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20439,11 +20609,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
        *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20494,11 +20663,10 @@ uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
        *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20832,6 +21000,13 @@ uint64_t  __attribute__((export_name("TS_ClosureReason_outdated_channel_manager"
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) {
+       LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+       LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+       jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ClosureReason_write"))) TS_ClosureReason_write(uint64_t obj) {
        LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
@@ -20910,6 +21085,13 @@ uint64_t  __attribute__((export_name("TS_HTLCDestination_failed_payment"))) TS_H
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCDestination_eq"))) TS_HTLCDestination_eq(uint64_t a, uint64_t b) {
+       LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+       LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+       jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCDestination_write"))) TS_HTLCDestination_write(uint64_t obj) {
        LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
@@ -21729,9 +21911,9 @@ uint64_t  __attribute__((export_name("TS_APIError_channel_unavailable"))) TS_API
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_APIError_monitor_update_failed"))) TS_APIError_monitor_update_failed() {
+uint64_t  __attribute__((export_name("TS_APIError_monitor_update_in_progress"))) TS_APIError_monitor_update_in_progress() {
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = APIError_monitor_update_failed();
+       *ret_copy = APIError_monitor_update_in_progress();
        uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -21748,6 +21930,13 @@ uint64_t  __attribute__((export_name("TS_APIError_incompatible_shutdown_script")
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_APIError_eq"))) TS_APIError_eq(uint64_t a, uint64_t b) {
+       LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+       LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+       jboolean ret_conv = APIError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_BigSize_free"))) TS_BigSize_free(uint64_t this_obj) {
        LDKBigSize this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -21821,6 +22010,21 @@ uint64_t  __attribute__((export_name("TS_Hostname_clone"))) TS_Hostname_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Hostname_eq"))) TS_Hostname_eq(uint64_t a, uint64_t b) {
+       LDKHostname a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHostname b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_t  __attribute__((export_name("TS_Hostname_len"))) TS_Hostname_len(uint64_t this_arg) {
        LDKHostname this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -22733,6 +22937,21 @@ uint64_t  __attribute__((export_name("TS_ChannelConfig_clone"))) TS_ChannelConfi
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelConfig_eq"))) TS_ChannelConfig_eq(uint64_t a, uint64_t b) {
+       LDKChannelConfig a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelConfig b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ChannelConfig_default"))) TS_ChannelConfig_default() {
        LDKChannelConfig ret_var = ChannelConfig_default();
        uint64_t ret_ref = 0;
@@ -23009,6 +23228,21 @@ uint64_t  __attribute__((export_name("TS_BestBlock_clone"))) TS_BestBlock_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBestBlock b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_BestBlock_from_genesis"))) TS_BestBlock_from_genesis(uint32_t network) {
        LDKNetwork network_conv = LDKNetwork_from_js(network);
        LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
@@ -23093,19 +23327,31 @@ void  __attribute__((export_name("TS_Confirm_free"))) TS_Confirm_free(uint64_t t
        Confirm_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_clone"))) TS_ChannelMonitorUpdateErr_clone(uint64_t orig) {
-       LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_clone(orig_conv));
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_clone"))) TS_ChannelMonitorUpdateStatus_clone(uint64_t orig) {
+       LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_clone(orig_conv));
+       return ret_conv;
+}
+
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_completed"))) TS_ChannelMonitorUpdateStatus_completed() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_completed());
        return ret_conv;
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_in_progress"))) TS_ChannelMonitorUpdateStatus_in_progress() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_in_progress());
        return ret_conv;
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_failure());
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_permanent_failure"))) TS_ChannelMonitorUpdateStatus_permanent_failure() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_permanent_failure());
+       return ret_conv;
+}
+
+jboolean  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_eq"))) TS_ChannelMonitorUpdateStatus_eq(uint64_t a, uint64_t b) {
+       LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+       LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+       jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
        return ret_conv;
 }
 
@@ -23260,6 +23506,21 @@ uint64_t  __attribute__((export_name("TS_WatchedOutput_clone"))) TS_WatchedOutpu
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_WatchedOutput_eq"))) TS_WatchedOutput_eq(uint64_t a, uint64_t b) {
+       LDKWatchedOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWatchedOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int64_t  __attribute__((export_name("TS_WatchedOutput_hash"))) TS_WatchedOutput_hash(uint64_t o) {
        LDKWatchedOutput o_conv;
        o_conv.inner = untag_ptr(o);
@@ -23725,14 +23986,14 @@ uint64_t  __attribute__((export_name("TS_MonitorEvent_commitment_tx_confirmed"))
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_MonitorEvent_update_completed"))) TS_MonitorEvent_update_completed(uint64_t funding_txo, int64_t monitor_update_id) {
+uint64_t  __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
        uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -23749,6 +24010,13 @@ uint64_t  __attribute__((export_name("TS_MonitorEvent_update_failed"))) TS_Monit
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_MonitorEvent_eq"))) TS_MonitorEvent_eq(uint64_t a, uint64_t b) {
+       LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+       LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+       jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_MonitorEvent_write"))) TS_MonitorEvent_write(uint64_t obj) {
        LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
@@ -23806,6 +24074,21 @@ uint64_t  __attribute__((export_name("TS_HTLCUpdate_clone"))) TS_HTLCUpdate_clon
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCUpdate_eq"))) TS_HTLCUpdate_eq(uint64_t a, uint64_t b) {
+       LDKHTLCUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCUpdate_write"))) TS_HTLCUpdate_write(uint64_t obj) {
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -24792,6 +25075,21 @@ uint64_t  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone"))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKDelayedPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
        LDKDelayedPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -24966,6 +25264,21 @@ uint64_t  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone")))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKStaticPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
        LDKStaticPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -25058,6 +25371,13 @@ uint64_t  __attribute__((export_name("TS_SpendableOutputDescriptor_static_paymen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+       LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+       jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
@@ -27715,6 +28035,30 @@ uint64_t  __attribute__((export_name("TS_ChannelManager_as_ChannelMessageHandler
        return tag_ptr(ret_ret, true);
 }
 
+uint64_t  __attribute__((export_name("TS_provided_node_features"))) TS_provided_node_features() {
+       LDKNodeFeatures ret_var = provided_node_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_provided_channel_features"))) TS_provided_channel_features() {
+       LDKChannelFeatures ret_var = provided_channel_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features() {
+       LDKInitFeatures ret_var = provided_init_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((export_name("TS_CounterpartyForwardingInfo_write"))) TS_CounterpartyForwardingInfo_write(uint64_t obj) {
        LDKCounterpartyForwardingInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -28127,44 +28471,92 @@ uint64_t  __attribute__((export_name("TS_create_from_hash"))) TS_create_from_has
        return tag_ptr(ret_conv, true);
 }
 
-void  __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_obj) {
-       LDKDecodeError this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       DecodeError_free(this_obj_conv);
+void  __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       DecodeError_free(this_ptr_conv);
 }
 
 static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
-       LDKDecodeError ret_var = DecodeError_clone(arg);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 int64_t  __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
-       LDKDecodeError arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+       LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+       int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 uint64_t  __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
-       LDKDecodeError orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_version();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_required_feature();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_invalid_value();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_short_read();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_bad_length_descriptor();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
+       LDKIOError a_conv = LDKIOError_from_js(a);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_io(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
+uint64_t  __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unsupported_compression();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+jboolean  __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
+       LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+       LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+       jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
        LDKInit this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28271,6 +28663,21 @@ uint64_t  __attribute__((export_name("TS_Init_clone"))) TS_Init_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
+       LDKInit a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInit b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
        LDKErrorMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28366,6 +28773,21 @@ uint64_t  __attribute__((export_name("TS_ErrorMessage_clone"))) TS_ErrorMessage_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
+       LDKErrorMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKErrorMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
        LDKWarningMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28461,6 +28883,21 @@ uint64_t  __attribute__((export_name("TS_WarningMessage_clone"))) TS_WarningMess
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
+       LDKWarningMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWarningMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
        LDKPing this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28545,6 +28982,21 @@ uint64_t  __attribute__((export_name("TS_Ping_clone"))) TS_Ping_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
+       LDKPing a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPing b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
        LDKPong this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28610,6 +29062,21 @@ uint64_t  __attribute__((export_name("TS_Pong_clone"))) TS_Pong_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
+       LDKPong a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPong b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
        LDKOpenChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29049,6 +29516,21 @@ uint64_t  __attribute__((export_name("TS_OpenChannel_clone"))) TS_OpenChannel_cl
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
+       LDKOpenChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOpenChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
        LDKAcceptChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29408,6 +29890,21 @@ uint64_t  __attribute__((export_name("TS_AcceptChannel_clone"))) TS_AcceptChanne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
+       LDKAcceptChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAcceptChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_free(uint64_t this_obj) {
        LDKFundingCreated this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29551,6 +30048,21 @@ uint64_t  __attribute__((export_name("TS_FundingCreated_clone"))) TS_FundingCrea
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_FundingCreated_eq"))) TS_FundingCreated_eq(uint64_t a, uint64_t b) {
+       LDKFundingCreated a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingCreated b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_free(uint64_t this_obj) {
        LDKFundingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29649,6 +30161,21 @@ uint64_t  __attribute__((export_name("TS_FundingSigned_clone"))) TS_FundingSigne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_FundingSigned_eq"))) TS_FundingSigned_eq(uint64_t a, uint64_t b) {
+       LDKFundingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free(uint64_t this_obj) {
        LDKChannelReady this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29776,6 +30303,21 @@ uint64_t  __attribute__((export_name("TS_ChannelReady_clone"))) TS_ChannelReady_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelReady_eq"))) TS_ChannelReady_eq(uint64_t a, uint64_t b) {
+       LDKChannelReady a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReady b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t this_obj) {
        LDKShutdown this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29877,6 +30419,21 @@ uint64_t  __attribute__((export_name("TS_Shutdown_clone"))) TS_Shutdown_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Shutdown_eq"))) TS_Shutdown_eq(uint64_t a, uint64_t b) {
+       LDKShutdown a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdown b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ClosingSignedFeeRange_free"))) TS_ClosingSignedFeeRange_free(uint64_t this_obj) {
        LDKClosingSignedFeeRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29961,6 +30518,21 @@ uint64_t  __attribute__((export_name("TS_ClosingSignedFeeRange_clone"))) TS_Clos
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingSignedFeeRange_eq"))) TS_ClosingSignedFeeRange_eq(uint64_t a, uint64_t b) {
+       LDKClosingSignedFeeRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSignedFeeRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_free(uint64_t this_obj) {
        LDKClosingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30110,6 +30682,21 @@ uint64_t  __attribute__((export_name("TS_ClosingSigned_clone"))) TS_ClosingSigne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingSigned_eq"))) TS_ClosingSigned_eq(uint64_t a, uint64_t b) {
+       LDKClosingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_free(uint64_t this_obj) {
        LDKUpdateAddHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30251,6 +30838,21 @@ uint64_t  __attribute__((export_name("TS_UpdateAddHTLC_clone"))) TS_UpdateAddHTL
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateAddHTLC_eq"))) TS_UpdateAddHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateAddHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateAddHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_OnionMessage_free"))) TS_OnionMessage_free(uint64_t this_obj) {
        LDKOnionMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30312,6 +30914,21 @@ uint64_t  __attribute__((export_name("TS_OnionMessage_clone"))) TS_OnionMessage_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_OnionMessage_eq"))) TS_OnionMessage_eq(uint64_t a, uint64_t b) {
+       LDKOnionMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOnionMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfillHTLC_free(uint64_t this_obj) {
        LDKUpdateFulfillHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30429,6 +31046,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFulfillHTLC_clone"))) TS_UpdateFu
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFulfillHTLC_eq"))) TS_UpdateFulfillHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFulfillHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFulfillHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_free(uint64_t this_obj) {
        LDKUpdateFailHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30509,6 +31141,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFailHTLC_clone"))) TS_UpdateFailH
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFailHTLC_eq"))) TS_UpdateFailHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFailHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateFailMalformedHTLC_free(uint64_t this_obj) {
        LDKUpdateFailMalformedHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30608,6 +31255,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFailMalformedHTLC_clone"))) TS_Up
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFailMalformedHTLC_eq"))) TS_UpdateFailMalformedHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFailMalformedHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailMalformedHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSigned_free(uint64_t this_obj) {
        LDKCommitmentSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30765,6 +31427,21 @@ uint64_t  __attribute__((export_name("TS_CommitmentSigned_clone"))) TS_Commitmen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_CommitmentSigned_eq"))) TS_CommitmentSigned_eq(uint64_t a, uint64_t b) {
+       LDKCommitmentSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free(uint64_t this_obj) {
        LDKRevokeAndACK this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30889,6 +31566,21 @@ uint64_t  __attribute__((export_name("TS_RevokeAndACK_clone"))) TS_RevokeAndACK_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_RevokeAndACK_eq"))) TS_RevokeAndACK_eq(uint64_t a, uint64_t b) {
+       LDKRevokeAndACK a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKRevokeAndACK b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64_t this_obj) {
        LDKUpdateFee this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30980,6 +31672,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFee_clone"))) TS_UpdateFee_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFee_eq"))) TS_UpdateFee_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFee a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFee b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_DataLossProtect_free"))) TS_DataLossProtect_free(uint64_t this_obj) {
        LDKDataLossProtect this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31078,6 +31785,21 @@ uint64_t  __attribute__((export_name("TS_DataLossProtect_clone"))) TS_DataLossPr
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_DataLossProtect_eq"))) TS_DataLossProtect_eq(uint64_t a, uint64_t b) {
+       LDKDataLossProtect a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDataLossProtect b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReestablish_free(uint64_t this_obj) {
        LDKChannelReestablish this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31177,6 +31899,21 @@ uint64_t  __attribute__((export_name("TS_ChannelReestablish_clone"))) TS_Channel
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelReestablish_eq"))) TS_ChannelReestablish_eq(uint64_t a, uint64_t b) {
+       LDKChannelReestablish a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReestablish b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_AnnouncementSignatures_free(uint64_t this_obj) {
        LDKAnnouncementSignatures this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31320,6 +32057,21 @@ uint64_t  __attribute__((export_name("TS_AnnouncementSignatures_clone"))) TS_Ann
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_AnnouncementSignatures_eq"))) TS_AnnouncementSignatures_eq(uint64_t a, uint64_t b) {
+       LDKAnnouncementSignatures a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAnnouncementSignatures b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_NetAddress_free"))) TS_NetAddress_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -31401,6 +32153,13 @@ uint64_t  __attribute__((export_name("TS_NetAddress_hostname"))) TS_NetAddress_h
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NetAddress_eq"))) TS_NetAddress_eq(uint64_t a, uint64_t b) {
+       LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+       LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+       jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NetAddress_write"))) TS_NetAddress_write(uint64_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
@@ -31619,6 +32378,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedNodeAnnouncement_clone"))) TS_U
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedNodeAnnouncement_eq"))) TS_UnsignedNodeAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_NodeAnnouncement_free"))) TS_NodeAnnouncement_free(uint64_t this_obj) {
        LDKNodeAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31723,6 +32497,21 @@ uint64_t  __attribute__((export_name("TS_NodeAnnouncement_clone"))) TS_NodeAnnou
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAnnouncement_eq"))) TS_NodeAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UnsignedChannelAnnouncement_free"))) TS_UnsignedChannelAnnouncement_free(uint64_t this_obj) {
        LDKUnsignedChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31922,6 +32711,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedChannelAnnouncement_clone"))) T
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedChannelAnnouncement_eq"))) TS_UnsignedChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelAnnouncement_free"))) TS_ChannelAnnouncement_free(uint64_t this_obj) {
        LDKChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32104,6 +32908,21 @@ uint64_t  __attribute__((export_name("TS_ChannelAnnouncement_clone"))) TS_Channe
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelAnnouncement_eq"))) TS_ChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UnsignedChannelUpdate_free"))) TS_UnsignedChannelUpdate_free(uint64_t this_obj) {
        LDKUnsignedChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32358,6 +33177,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedChannelUpdate_clone"))) TS_Unsi
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedChannelUpdate_eq"))) TS_UnsignedChannelUpdate_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelUpdate_free"))) TS_ChannelUpdate_free(uint64_t this_obj) {
        LDKChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32462,6 +33296,21 @@ uint64_t  __attribute__((export_name("TS_ChannelUpdate_clone"))) TS_ChannelUpdat
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelUpdate_eq"))) TS_ChannelUpdate_eq(uint64_t a, uint64_t b) {
+       LDKChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_QueryChannelRange_free"))) TS_QueryChannelRange_free(uint64_t this_obj) {
        LDKQueryChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32572,6 +33421,21 @@ uint64_t  __attribute__((export_name("TS_QueryChannelRange_clone"))) TS_QueryCha
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_QueryChannelRange_eq"))) TS_QueryChannelRange_eq(uint64_t a, uint64_t b) {
+       LDKQueryChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ReplyChannelRange_free"))) TS_ReplyChannelRange_free(uint64_t this_obj) {
        LDKReplyChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32753,6 +33617,21 @@ uint64_t  __attribute__((export_name("TS_ReplyChannelRange_clone"))) TS_ReplyCha
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ReplyChannelRange_eq"))) TS_ReplyChannelRange_eq(uint64_t a, uint64_t b) {
+       LDKReplyChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_QueryShortChannelIds_free"))) TS_QueryShortChannelIds_free(uint64_t this_obj) {
        LDKQueryShortChannelIds this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32877,6 +33756,21 @@ uint64_t  __attribute__((export_name("TS_QueryShortChannelIds_clone"))) TS_Query
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_QueryShortChannelIds_eq"))) TS_QueryShortChannelIds_eq(uint64_t a, uint64_t b) {
+       LDKQueryShortChannelIds a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryShortChannelIds b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_free"))) TS_ReplyShortChannelIdsEnd_free(uint64_t this_obj) {
        LDKReplyShortChannelIdsEnd this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32968,6 +33862,21 @@ uint64_t  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_clone"))) TS_Re
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_eq"))) TS_ReplyShortChannelIdsEnd_eq(uint64_t a, uint64_t b) {
+       LDKReplyShortChannelIdsEnd a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyShortChannelIdsEnd b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_GossipTimestampFilter_free"))) TS_GossipTimestampFilter_free(uint64_t this_obj) {
        LDKGossipTimestampFilter this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33078,6 +33987,21 @@ uint64_t  __attribute__((export_name("TS_GossipTimestampFilter_clone"))) TS_Goss
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_GossipTimestampFilter_eq"))) TS_GossipTimestampFilter_eq(uint64_t a, uint64_t b) {
+       LDKGossipTimestampFilter a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKGossipTimestampFilter b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ErrorAction_free"))) TS_ErrorAction_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -33634,6 +34558,21 @@ uint64_t  __attribute__((export_name("TS_CommitmentUpdate_clone"))) TS_Commitmen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_CommitmentUpdate_eq"))) TS_CommitmentUpdate_eq(uint64_t a, uint64_t b) {
+       LDKCommitmentUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelMessageHandler_free"))) TS_ChannelMessageHandler_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -34522,6 +35461,17 @@ uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_OnionMessageH
        return tag_ptr(ret_ret, true);
 }
 
+uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomOnionMessageHandler"))) TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(uint64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomMessageReader"))) TS_IgnoringMessageHandler_as_CustomMessageReader(uint64_t this_arg) {
        LDKIgnoringMessageHandler this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -34804,7 +35754,7 @@ void  __attribute__((export_name("TS_PeerManager_free"))) TS_PeerManager_free(ui
        PeerManager_free(this_obj_conv);
 }
 
-uint64_t  __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
+uint64_t  __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
        LDKMessageHandler message_handler_conv;
        message_handler_conv.inner = untag_ptr(message_handler);
        message_handler_conv.is_owned = ptr_is_owned(message_handler);
@@ -35359,6 +36309,21 @@ uint64_t  __attribute__((export_name("TS_TxCreationKeys_new"))) TS_TxCreationKey
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_TxCreationKeys_eq"))) TS_TxCreationKeys_eq(uint64_t a, uint64_t b) {
+       LDKTxCreationKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTxCreationKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
        LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
        uint64_t ret_ref = 0;
@@ -35588,6 +36553,21 @@ uint64_t  __attribute__((export_name("TS_ChannelPublicKeys_clone"))) TS_ChannelP
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelPublicKeys_eq"))) TS_ChannelPublicKeys_eq(uint64_t a, uint64_t b) {
+       LDKChannelPublicKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelPublicKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ChannelPublicKeys_write"))) TS_ChannelPublicKeys_write(uint64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -35823,6 +36803,21 @@ uint64_t  __attribute__((export_name("TS_HTLCOutputInCommitment_clone"))) TS_HTL
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCOutputInCommitment_eq"))) TS_HTLCOutputInCommitment_eq(uint64_t a, uint64_t b) {
+       LDKHTLCOutputInCommitment a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCOutputInCommitment b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCOutputInCommitment_write"))) TS_HTLCOutputInCommitment_write(uint64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -36743,6 +37738,21 @@ int64_t  __attribute__((export_name("TS_ClosingTransaction_hash"))) TS_ClosingTr
        return ret_conv;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingTransaction_eq"))) TS_ClosingTransaction_eq(uint64_t a, uint64_t b) {
+       LDKClosingTransaction a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingTransaction b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ClosingTransaction_new"))) TS_ClosingTransaction_new(int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, uint64_t funding_outpoint) {
        LDKCVec_u8Z to_holder_script_ref;
        to_holder_script_ref.datalen = to_holder_script->arr_len;
@@ -37383,22 +38393,6 @@ void  __attribute__((export_name("TS_ChannelTypeFeatures_free"))) TS_ChannelType
        ChannelTypeFeatures_free(this_obj_conv);
 }
 
-uint64_t  __attribute__((export_name("TS_InitFeatures_known_channel_features"))) TS_InitFeatures_known_channel_features() {
-       LDKInitFeatures ret_var = InitFeatures_known_channel_features();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-uint64_t  __attribute__((export_name("TS_NodeFeatures_known_channel_features"))) TS_NodeFeatures_known_channel_features() {
-       LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 uint64_t  __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_empty() {
        LDKInitFeatures ret_var = InitFeatures_empty();
        uint64_t ret_ref = 0;
@@ -37407,14 +38401,6 @@ uint64_t  __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_InitFeatures_known"))) TS_InitFeatures_known() {
-       LDKInitFeatures ret_var = InitFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_InitFeatures_requires_unknown_bits"))) TS_InitFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKInitFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37433,14 +38419,6 @@ uint64_t  __attribute__((export_name("TS_NodeFeatures_empty"))) TS_NodeFeatures_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_NodeFeatures_known"))) TS_NodeFeatures_known() {
-       LDKNodeFeatures ret_var = NodeFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_NodeFeatures_requires_unknown_bits"))) TS_NodeFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKNodeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37459,14 +38437,6 @@ uint64_t  __attribute__((export_name("TS_ChannelFeatures_empty"))) TS_ChannelFea
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_ChannelFeatures_known"))) TS_ChannelFeatures_known() {
-       LDKChannelFeatures ret_var = ChannelFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_ChannelFeatures_requires_unknown_bits"))) TS_ChannelFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKChannelFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37485,14 +38455,6 @@ uint64_t  __attribute__((export_name("TS_InvoiceFeatures_empty"))) TS_InvoiceFea
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_InvoiceFeatures_known"))) TS_InvoiceFeatures_known() {
-       LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_InvoiceFeatures_requires_unknown_bits"))) TS_InvoiceFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKInvoiceFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37511,14 +38473,6 @@ uint64_t  __attribute__((export_name("TS_ChannelTypeFeatures_empty"))) TS_Channe
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_ChannelTypeFeatures_known"))) TS_ChannelTypeFeatures_known() {
-       LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_ChannelTypeFeatures_requires_unknown_bits"))) TS_ChannelTypeFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKChannelTypeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38964,6 +39918,21 @@ uint64_t  __attribute__((export_name("TS_ShutdownScript_clone"))) TS_ShutdownScr
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ShutdownScript_eq"))) TS_ShutdownScript_eq(uint64_t a, uint64_t b) {
+       LDKShutdownScript a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdownScript b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_InvalidShutdownScript_free"))) TS_InvalidShutdownScript_free(uint64_t this_obj) {
        LDKInvalidShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -39344,6 +40313,13 @@ uint64_t  __attribute__((export_name("TS_NetworkUpdate_node_failure"))) TS_Netwo
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NetworkUpdate_eq"))) TS_NetworkUpdate_eq(uint64_t a, uint64_t b) {
+       LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+       LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+       jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NetworkUpdate_write"))) TS_NetworkUpdate_write(uint64_t obj) {
        LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
@@ -39660,6 +40636,21 @@ uint64_t  __attribute__((export_name("TS_ChannelUpdateInfo_clone"))) TS_ChannelU
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelUpdateInfo_eq"))) TS_ChannelUpdateInfo_eq(uint64_t a, uint64_t b) {
+       LDKChannelUpdateInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdateInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ChannelUpdateInfo_write"))) TS_ChannelUpdateInfo_write(uint64_t obj) {
        LDKChannelUpdateInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -39908,6 +40899,21 @@ uint64_t  __attribute__((export_name("TS_ChannelInfo_clone"))) TS_ChannelInfo_cl
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelInfo_eq"))) TS_ChannelInfo_eq(uint64_t a, uint64_t b) {
+       LDKChannelInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ChannelInfo_get_directional_info"))) TS_ChannelInfo_get_directional_info(uint64_t this_arg, int8_t channel_flags) {
        LDKChannelInfo this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -40484,6 +41490,21 @@ uint64_t  __attribute__((export_name("TS_NodeAnnouncementInfo_clone"))) TS_NodeA
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAnnouncementInfo_eq"))) TS_NodeAnnouncementInfo_eq(uint64_t a, uint64_t b) {
+       LDKNodeAnnouncementInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncementInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeAnnouncementInfo_write"))) TS_NodeAnnouncementInfo_write(uint64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40579,6 +41600,21 @@ uint64_t  __attribute__((export_name("TS_NodeAlias_clone"))) TS_NodeAlias_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAlias_eq"))) TS_NodeAlias_eq(uint64_t a, uint64_t b) {
+       LDKNodeAlias a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAlias b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeAlias_write"))) TS_NodeAlias_write(uint64_t obj) {
        LDKNodeAlias obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40764,6 +41800,21 @@ uint64_t  __attribute__((export_name("TS_NodeInfo_clone"))) TS_NodeInfo_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t a, uint64_t b) {
+       LDKNodeInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40986,25 +42037,25 @@ void  __attribute__((export_name("TS_NetworkGraph_channel_failed"))) TS_NetworkG
        NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
 }
 
-void  __attribute__((export_name("TS_NetworkGraph_node_failed"))) TS_NetworkGraph_node_failed(uint64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+void  __attribute__((export_name("TS_NetworkGraph_node_failed_permanent"))) TS_NetworkGraph_node_failed_permanent(uint64_t this_arg, int8_tArray node_id) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKPublicKey _node_id_ref;
-       CHECK(_node_id->arr_len == 33);
-       memcpy(_node_id_ref.compressed_form, _node_id->elems, 33); FREE(_node_id);
-       NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+       LDKPublicKey node_id_ref;
+       CHECK(node_id->arr_len == 33);
+       memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+       NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
 }
 
-void  __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_with_time"))) TS_NetworkGraph_remove_stale_channels_with_time(uint64_t this_arg, int64_t current_time_unix) {
+void  __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_and_tracking_with_time"))) TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(uint64_t this_arg, int64_t current_time_unix) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+       NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
 }
 
 uint64_t  __attribute__((export_name("TS_NetworkGraph_update_channel"))) TS_NetworkGraph_update_channel(uint64_t this_arg, uint64_t msg) {
@@ -43055,6 +44106,63 @@ void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_liquidit
        ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
 }
 
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
 int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
        LDKProbabilisticScoringParameters this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -43508,6 +44616,13 @@ uint64_t  __attribute__((export_name("TS_SendError_invalid_first_hop"))) TS_Send
        return ret_ref;
 }
 
+uint64_t  __attribute__((export_name("TS_SendError_invalid_message"))) TS_SendError_invalid_message() {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_invalid_message();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 uint64_t  __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_buffer_full() {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_buffer_full();
@@ -43515,7 +44630,23 @@ uint64_t  __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger) {
+jboolean  __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) {
+       LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+       LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+       jboolean ret_conv = SendError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CustomOnionMessageHandler_free"))) TS_CustomOnionMessageHandler_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger, uint64_t custom_handler) {
        void* keys_manager_ptr = untag_ptr(keys_manager);
        CHECK_ACCESS(keys_manager_ptr);
        LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
@@ -43530,14 +44661,21 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+       void* custom_handler_ptr = untag_ptr(custom_handler);
+       CHECK_ACCESS(custom_handler_ptr);
+       LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+       if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+       }
+       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
        uint64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t reply_path) {
+uint64_t  __attribute__((export_name("TS_OnionMessenger_send_custom_onion_message"))) TS_OnionMessenger_send_custom_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t msg, uint64_t reply_path) {
        LDKOnionMessenger this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -43562,13 +44700,20 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) T
        CHECK_ACCESS(destination_ptr);
        LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
        // WARNING: we may need a move here but no clone is available for LDKDestination
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
        LDKBlindedRoute reply_path_conv;
        reply_path_conv.inner = untag_ptr(reply_path);
        reply_path_conv.is_owned = ptr_is_owned(reply_path);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv.is_owned = false;
        LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
-       *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+       *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -43594,6 +44739,135 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_as_OnionMessageProvider"
        return tag_ptr(ret_ret, true);
 }
 
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(arg);
+       return tag_ptr(ret_ret, true);
+}
+int64_t  __attribute__((export_name("TS_CustomOnionMessageContents_clone_ptr"))) TS_CustomOnionMessageContents_clone_ptr(uint64_t arg) {
+       void* arg_ptr = untag_ptr(arg);
+       if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+       LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+       int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CustomOnionMessageContents_clone"))) TS_CustomOnionMessageContents_clone(uint64_t orig) {
+       void* orig_ptr = untag_ptr(orig);
+       if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+       LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+void  __attribute__((export_name("TS_CustomOnionMessageContents_free"))) TS_CustomOnionMessageContents_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageContents_free(this_ptr_conv);
+}
+
+void  __attribute__((export_name("TS_RapidGossipSync_free"))) TS_RapidGossipSync_free(uint64_t this_obj) {
+       LDKRapidGossipSync this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RapidGossipSync_free(this_obj_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_RapidGossipSync_new"))) TS_RapidGossipSync_new(uint64_t network_graph) {
+       LDKNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKRapidGossipSync ret_var = RapidGossipSync_new(&network_graph_conv);
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_RapidGossipSync_update_network_graph"))) TS_RapidGossipSync_update_network_graph(uint64_t this_arg, int8_tArray update_data) {
+       LDKRapidGossipSync this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKu8slice update_data_ref;
+       update_data_ref.datalen = update_data->arr_len;
+       update_data_ref.data = update_data->elems;
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
+       FREE(update_data);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_RapidGossipSync_is_initial_sync_complete"))) TS_RapidGossipSync_is_initial_sync_complete(uint64_t this_arg) {
+       LDKRapidGossipSync this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = RapidGossipSync_is_initial_sync_complete(&this_arg_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_GraphSyncError_free"))) TS_GraphSyncError_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKGraphSyncError this_ptr_conv = *(LDKGraphSyncError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       GraphSyncError_free(this_ptr_conv);
+}
+
+static inline uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg) {
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+int64_t  __attribute__((export_name("TS_GraphSyncError_clone_ptr"))) TS_GraphSyncError_clone_ptr(uint64_t arg) {
+       LDKGraphSyncError* arg_conv = (LDKGraphSyncError*)untag_ptr(arg);
+       int64_t ret_conv = GraphSyncError_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncError_clone(uint64_t orig) {
+       LDKGraphSyncError* orig_conv = (LDKGraphSyncError*)untag_ptr(orig);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+       a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_decode_error(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_lightning_error"))) TS_GraphSyncError_lightning_error(uint64_t a) {
+       LDKLightningError a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = LightningError_clone(&a_conv);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_lightning_error(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 void  __attribute__((export_name("TS_ParseError_free"))) TS_ParseError_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -43757,6 +45031,13 @@ uint64_t  __attribute__((export_name("TS_ParseError_skip"))) TS_ParseError_skip(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ParseError_eq"))) TS_ParseError_eq(uint64_t a, uint64_t b) {
+       LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+       LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+       jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ParseOrSemanticError_free"))) TS_ParseOrSemanticError_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -43805,6 +45086,13 @@ uint64_t  __attribute__((export_name("TS_ParseOrSemanticError_semantic_error")))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ParseOrSemanticError_eq"))) TS_ParseOrSemanticError_eq(uint64_t a, uint64_t b) {
+       LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+       LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+       jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Invoice_free"))) TS_Invoice_free(uint64_t this_obj) {
        LDKInvoice this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -45851,7 +47139,7 @@ uint64_t  __attribute__((export_name("TS_InFlightHtlcs_read"))) TS_InFlightHtlcs
        return tag_ptr(ret_conv, true);
 }
 
-uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -45864,6 +47152,13 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_js(network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -45875,11 +47170,11 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -45892,6 +47187,13 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_js(network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -45899,7 +47201,7 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = str_ref_to_owned_c(description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
index 26ce5b454ea5a575b2a0181e3a663d2e52dcfb8e..4f107bea14f900786c5d41217f252ca159f03a6f 100644 (file)
@@ -177,17 +177,19 @@ static inline int32_t LDKCOption_NoneZ_to_js(LDKCOption_NoneZ val) {
                default: abort();
        }
 }
-static inline LDKChannelMonitorUpdateErr LDKChannelMonitorUpdateErr_from_js(int32_t ord) {
+static inline LDKChannelMonitorUpdateStatus LDKChannelMonitorUpdateStatus_from_js(int32_t ord) {
        switch (ord) {
-               case 0: return LDKChannelMonitorUpdateErr_TemporaryFailure;
-               case 1: return LDKChannelMonitorUpdateErr_PermanentFailure;
+               case 0: return LDKChannelMonitorUpdateStatus_Completed;
+               case 1: return LDKChannelMonitorUpdateStatus_InProgress;
+               case 2: return LDKChannelMonitorUpdateStatus_PermanentFailure;
        }
        abort();
 }
-static inline int32_t LDKChannelMonitorUpdateErr_to_js(LDKChannelMonitorUpdateErr val) {
+static inline int32_t LDKChannelMonitorUpdateStatus_to_js(LDKChannelMonitorUpdateStatus val) {
        switch (val) {
-               case LDKChannelMonitorUpdateErr_TemporaryFailure: return 0;
-               case LDKChannelMonitorUpdateErr_PermanentFailure: return 1;
+               case LDKChannelMonitorUpdateStatus_Completed: return 0;
+               case LDKChannelMonitorUpdateStatus_InProgress: return 1;
+               case LDKChannelMonitorUpdateStatus_PermanentFailure: return 2;
                default: abort();
        }
 }
@@ -516,6 +518,25 @@ void  __attribute__((export_name("TS_CResult_BlindedRouteNoneZ_get_err"))) TS_CR
        CResult_BlindedRouteNoneZ_get_err(owner_conv);
 }
 
+uint32_t __attribute__((export_name("TS_LDKDecodeError_ty_from_ptr"))) TS_LDKDecodeError_ty_from_ptr(uint64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKDecodeError_UnknownVersion: return 0;
+               case LDKDecodeError_UnknownRequiredFeature: return 1;
+               case LDKDecodeError_InvalidValue: return 2;
+               case LDKDecodeError_ShortRead: return 3;
+               case LDKDecodeError_BadLengthDescriptor: return 4;
+               case LDKDecodeError_Io: return 5;
+               case LDKDecodeError_UnsupportedCompression: return 6;
+               default: abort();
+       }
+}
+uint32_t __attribute__((export_name("TS_LDKDecodeError_Io_get_io"))) TS_LDKDecodeError_Io_get_io(uint64_t ptr) {
+       LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
+       assert(obj->tag == LDKDecodeError_Io);
+                       uint32_t io_conv = LDKIOError_to_js(obj->io);
+       return io_conv;
+}
 static inline struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
        LDKBlindedRoute ret = *owner->contents.result;
        ret.is_owned = false;
@@ -531,16 +552,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_BlindedRouteDecodeErrorZ_get_err(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_get_err"))) TS_CResult_BlindedRouteDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BlindedRouteDecodeErrorZ* owner_conv = (LDKCResult_BlindedRouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedRouteDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -559,16 +578,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_get_err"))) TS_CResult_BlindedHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BlindedHopDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BlindedHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -605,16 +622,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDe
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -675,16 +690,14 @@ uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_get_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_TxCreationKeysDecodeErrorZ* owner_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_TxCreationKeysDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -703,16 +716,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelPublicKeysDecodeErrorZ* owner_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -769,16 +780,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* owner_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -797,16 +806,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionP
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -825,16 +832,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDec
 }
 
 static inline struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* owner_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -853,16 +858,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDeco
 }
 
 static inline struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -881,16 +884,14 @@ uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecod
 }
 
 static inline struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -932,16 +933,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_get_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CommitmentTransactionDecodeErrorZ* owner_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentTransactionDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1011,16 +1010,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_get_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ShutdownScriptDecodeErrorZ* owner_conv = (LDKCResult_ShutdownScriptDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownScriptDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1067,16 +1064,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_get_err"))) TS_CResult_RouteHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1109,16 +1104,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_ok"))) TS
 }
 
 static inline struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_get_err"))) TS_CResult_RouteDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteDecodeErrorZ* owner_conv = (LDKCResult_RouteDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1137,16 +1130,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_get_err"))) TS_CResult_RouteParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteParametersDecodeErrorZ* owner_conv = (LDKCResult_RouteParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1191,16 +1182,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_PaymentParametersDecodeErrorZ_get_err(LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_get_err"))) TS_CResult_PaymentParametersDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PaymentParametersDecodeErrorZ* owner_conv = (LDKCResult_PaymentParametersDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentParametersDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1226,16 +1215,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_get_err"))) TS_CResult_RouteHintDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHintDecodeErrorZ* owner_conv = (LDKCResult_RouteHintDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1254,16 +1241,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_get_err"))) TS_CResult_RouteHintHopDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RouteHintHopDecodeErrorZ* owner_conv = (LDKCResult_RouteHintHopDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RouteHintHopDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1344,16 +1329,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_PaymentPurposeDecodeErrorZ_get_err(LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_get_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PaymentPurposeDecodeErrorZ* owner_conv = (LDKCResult_PaymentPurposeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentPurposeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1412,16 +1395,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* owner_conv = (LDKCResult_COption_ClosureReasonZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -1488,16 +1469,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeE
 }
 
 static inline struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* owner_conv = (LDKCResult_COption_HTLCDestinationZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2060,16 +2039,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_get_err"))) TS_CResult_COption_EventZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_EventZDecodeErrorZ* owner_conv = (LDKCResult_COption_EventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_EventZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2533,31 +2510,12 @@ static inline LDKCVec_TxidZ CVec_TxidZ_clone(const LDKCVec_TxidZ *orig) {
        }
        return ret;
 }
-static inline void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-void  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(uint64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner_conv);
-}
-
-static inline enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return ChannelMonitorUpdateErr_clone(&*owner->contents.err);
-}
-uint32_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_get_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(uint64_t owner) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* owner_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(owner);
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(CResult_NoneChannelMonitorUpdateErrZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 uint32_t __attribute__((export_name("TS_LDKMonitorEvent_ty_from_ptr"))) TS_LDKMonitorEvent_ty_from_ptr(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKMonitorEvent_HTLCEvent: return 0;
                case LDKMonitorEvent_CommitmentTxConfirmed: return 1;
-               case LDKMonitorEvent_UpdateCompleted: return 2;
+               case LDKMonitorEvent_Completed: return 2;
                case LDKMonitorEvent_UpdateFailed: return 3;
                default: abort();
        }
@@ -2580,19 +2538,19 @@ uint64_t __attribute__((export_name("TS_LDKMonitorEvent_CommitmentTxConfirmed_ge
                        commitment_tx_confirmed_ref = tag_ptr(commitment_tx_confirmed_var.inner, false);
        return commitment_tx_confirmed_ref;
 }
-uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo"))) TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(uint64_t ptr) {
+uint64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_funding_txo"))) TS_LDKMonitorEvent_Completed_get_funding_txo(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
-       assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
-                       LDKOutPoint funding_txo_var = obj->update_completed.funding_txo;
+       assert(obj->tag == LDKMonitorEvent_Completed);
+                       LDKOutPoint funding_txo_var = obj->completed.funding_txo;
                        uint64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
        return funding_txo_ref;
 }
-int64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id"))) TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(uint64_t ptr) {
+int64_t __attribute__((export_name("TS_LDKMonitorEvent_Completed_get_monitor_update_id"))) TS_LDKMonitorEvent_Completed_get_monitor_update_id(uint64_t ptr) {
        LDKMonitorEvent *obj = (LDKMonitorEvent*)untag_ptr(ptr);
-       assert(obj->tag == LDKMonitorEvent_UpdateCompleted);
-                       int64_t monitor_update_id_conv = obj->update_completed.monitor_update_id;
+       assert(obj->tag == LDKMonitorEvent_Completed);
+                       int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
        return monitor_update_id_conv;
 }
 uint64_t __attribute__((export_name("TS_LDKMonitorEvent_UpdateFailed_get_update_failed"))) TS_LDKMonitorEvent_UpdateFailed_get_update_failed(uint64_t ptr) {
@@ -2677,16 +2635,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_FixedPenaltyScorerDecodeErrorZ_get_err(LDKCResult_FixedPenaltyScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* owner_conv = (LDKCResult_FixedPenaltyScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2786,16 +2742,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ProbabilisticScorerDecodeErrorZ* owner_conv = (LDKCResult_ProbabilisticScorerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ProbabilisticScorerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2814,16 +2768,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_get_err"))) TS_CResult_InitFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2842,16 +2794,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2870,16 +2820,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_get_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2898,16 +2846,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get
 }
 
 static inline struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2926,16 +2872,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2954,16 +2898,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_ok"))) T
 }
 
 static inline struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_get_err"))) TS_CResult_NodeIdDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeIdDecodeErrorZ* owner_conv = (LDKCResult_NodeIdDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeIdDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -2980,16 +2922,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* owner_conv = (LDKCResult_COption_NetworkUpdateZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3189,16 +3129,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateInfoDecodeErrorZ_get_err(LDKCResult_ChannelUpdateInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3217,16 +3155,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_get_err"))) TS_CResult_ChannelInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelInfoDecodeErrorZ* owner_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3245,16 +3181,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_get_err"))) TS_CResult_RoutingFeesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RoutingFeesDecodeErrorZ* owner_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RoutingFeesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3364,16 +3298,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeError
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3392,16 +3324,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_get_err"))) TS_CResult_NodeAliasDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAliasDecodeErrorZ* owner_conv = (LDKCResult_NodeAliasDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAliasDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3420,16 +3350,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_get_err"))) TS_CResult_NodeInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeInfoDecodeErrorZ* owner_conv = (LDKCResult_NodeInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3448,16 +3376,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_get_err"))) TS_CResult_NetworkGraphDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NetworkGraphDecodeErrorZ* owner_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetworkGraphDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3498,16 +3424,14 @@ uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorD
 }
 
 static inline struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3526,16 +3450,14 @@ uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDe
 }
 
 static inline struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3552,16 +3474,14 @@ uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecode
 }
 
 static inline struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* owner_conv = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -3700,6 +3620,26 @@ void  __attribute__((export_name("TS_CResult_SecretKeyNoneZ_get_err"))) TS_CResu
        CResult_SecretKeyNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+int8_tArray  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_ok"))) TS_CResult_PublicKeyNoneZ_get_ok(uint64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+       memcpy(ret_arr->elems, CResult_PublicKeyNoneZ_get_ok(owner_conv).compressed_form, 33);
+       return ret_arr;
+}
+
+static inline void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+void  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_get_err"))) TS_CResult_PublicKeyNoneZ_get_err(uint64_t owner) {
+       LDKCResult_PublicKeyNoneZ* owner_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(owner);
+       CResult_PublicKeyNoneZ_get_err(owner_conv);
+}
+
 uint32_t __attribute__((export_name("TS_LDKCOption_ScalarZ_ty_from_ptr"))) TS_LDKCOption_ScalarZ_ty_from_ptr(uint64_t ptr) {
        LDKCOption_ScalarZ *obj = (LDKCOption_ScalarZ*)untag_ptr(ptr);
        switch(obj->tag) {
@@ -3921,6 +3861,20 @@ LDKCResult_SignatureNoneZ sign_closing_transaction_LDKBaseSign_jcall(const void*
        FREE(untag_ptr(ret));
        return ret_conv;
 }
+LDKCResult_SignatureNoneZ sign_holder_anchor_input_LDKBaseSign_jcall(const void* this_arg, LDKTransaction anchor_tx, uintptr_t input) {
+       LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
+       LDKTransaction anchor_tx_var = anchor_tx;
+       int8_tArray anchor_tx_arr = init_int8_tArray(anchor_tx_var.datalen, __LINE__);
+       memcpy(anchor_tx_arr->elems, anchor_tx_var.data, anchor_tx_var.datalen);
+       Transaction_free(anchor_tx_var);
+       uint32_t input_conv = input;
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 13, (uint32_t)anchor_tx_arr, input_conv, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
 LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSign_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) this_arg;
        LDKUnsignedChannelAnnouncement msg_var = *msg;
@@ -3928,7 +3882,7 @@ LDKCResult_C2Tuple_SignatureSignatureZNoneZ sign_channel_announcement_LDKBaseSig
        msg_var = UnsignedChannelAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 13, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 14, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_C2Tuple_SignatureSignatureZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureSignatureZNoneZ*)(ret_ptr);
@@ -3942,7 +3896,7 @@ void ready_channel_LDKBaseSign_jcall(void* this_arg, const LDKChannelTransaction
        channel_parameters_var = ChannelTransactionParameters_clone(&channel_parameters_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_parameters_var);
        channel_parameters_ref = tag_ptr(channel_parameters_var.inner, channel_parameters_var.is_owned);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 14, channel_parameters_ref, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 15, channel_parameters_ref, 0, 0, 0, 0, 0);
 }
 static void LDKBaseSign_JCalls_cloned(LDKBaseSign* new_obj) {
        LDKBaseSign_JCalls *j_calls = (LDKBaseSign_JCalls*) new_obj->this_arg;
@@ -3971,6 +3925,7 @@ static inline LDKBaseSign LDKBaseSign_init (JSValue o, uint64_t pubkeys) {
                .sign_justice_revoked_htlc = sign_justice_revoked_htlc_LDKBaseSign_jcall,
                .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_LDKBaseSign_jcall,
                .sign_closing_transaction = sign_closing_transaction_LDKBaseSign_jcall,
+               .sign_holder_anchor_input = sign_holder_anchor_input_LDKBaseSign_jcall,
                .sign_channel_announcement = sign_channel_announcement_LDKBaseSign_jcall,
                .ready_channel = ready_channel_LDKBaseSign_jcall,
                .free = LDKBaseSign_JCalls_free,
@@ -4173,6 +4128,20 @@ uint64_t  __attribute__((export_name("TS_BaseSign_sign_closing_transaction"))) T
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_BaseSign_sign_holder_anchor_input"))) TS_BaseSign_sign_holder_anchor_input(uint64_t this_arg, int8_tArray anchor_tx, uint32_t input) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKBaseSign* this_arg_conv = (LDKBaseSign*)this_arg_ptr;
+       LDKTransaction anchor_tx_ref;
+       anchor_tx_ref.datalen = anchor_tx->arr_len;
+       anchor_tx_ref.data = MALLOC(anchor_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(anchor_tx_ref.data, anchor_tx->elems, anchor_tx_ref.datalen); FREE(anchor_tx);
+       anchor_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_anchor_input)(this_arg_conv->this_arg, anchor_tx_ref, input);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_BaseSign_sign_channel_announcement"))) TS_BaseSign_sign_channel_announcement(uint64_t this_arg, uint64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -4228,7 +4197,7 @@ static void LDKSign_JCalls_free(void* this_arg) {
 }
 LDKCVec_u8Z write_LDKSign_jcall(const void* this_arg) {
        LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 15, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 16, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -4288,16 +4257,14 @@ uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_get_err"))) TS_CResult_SignDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_SignDecodeErrorZ* owner_conv = (LDKCResult_SignDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_SignDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_SignDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4374,16 +4341,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_get_err"))) TS_CResult_InMemorySignerDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InMemorySignerDecodeErrorZ* owner_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InMemorySignerDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4436,7 +4401,7 @@ uint32_t __attribute__((export_name("TS_LDKAPIError_ty_from_ptr"))) TS_LDKAPIErr
                case LDKAPIError_FeeRateTooHigh: return 1;
                case LDKAPIError_RouteError: return 2;
                case LDKAPIError_ChannelUnavailable: return 3;
-               case LDKAPIError_MonitorUpdateFailed: return 4;
+               case LDKAPIError_MonitorUpdateInProgress: return 4;
                case LDKAPIError_IncompatibleShutdownScript: return 5;
                default: abort();
        }
@@ -4858,16 +4823,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecod
 }
 
 static inline struct LDKDecodeError CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* owner_conv = (LDKCResult_CounterpartyForwardingInfoDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4886,16 +4849,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelCounterpartyDecodeErrorZ_get_err(LDKCResult_ChannelCounterpartyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelCounterpartyDecodeErrorZ* owner_conv = (LDKCResult_ChannelCounterpartyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelCounterpartyDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4914,16 +4875,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_ChannelDetailsDecodeErrorZ_get_err(LDKCResult_ChannelDetailsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_get_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelDetailsDecodeErrorZ* owner_conv = (LDKCResult_ChannelDetailsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelDetailsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4942,16 +4901,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_PhantomRouteHintsDecodeErrorZ_get_err(LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PhantomRouteHintsDecodeErrorZ* owner_conv = (LDKCResult_PhantomRouteHintsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -4972,7 +4929,7 @@ static void LDKWatch_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+LDKChannelMonitorUpdateStatus watch_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        LDKOutPoint funding_txo_var = funding_txo;
        uint64_t funding_txo_ref = 0;
@@ -4982,14 +4939,11 @@ LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_LDKWatch_jcall(const void*
        uint64_t monitor_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
        monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
-       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 16, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, monitor_ref, 0, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        LDKOutPoint funding_txo_var = funding_txo;
        uint64_t funding_txo_ref = 0;
@@ -4999,16 +4953,13 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_LDKWatch_jcall(const void
        uint64_t update_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
        update_ref = tag_ptr(update_var.inner, update_var.is_owned);
-       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 17, funding_txo_ref, update_ref, 0, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbuuuu(j_calls->instance_ptr, 18, funding_txo_ref, update_ref, 0, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
 LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 18, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, 0, 0, 0, 0, 0, 0);
        LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -5050,7 +5001,7 @@ uint64_t  __attribute__((export_name("TS_LDKWatch_new"))) TS_LDKWatch_new(JSValu
        *res_ptr = LDKWatch_init(o);
        return tag_ptr(res_ptr, true);
 }
-uint64_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
+uint32_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t monitor) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -5064,12 +5015,11 @@ uint64_t  __attribute__((export_name("TS_Watch_watch_channel"))) TS_Watch_watch_
        monitor_conv.is_owned = ptr_is_owned(monitor);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_conv);
        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 tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv));
+       return ret_conv;
 }
 
-uint64_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
+uint32_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_update_channel(uint64_t this_arg, uint64_t funding_txo, uint64_t update) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
@@ -5083,9 +5033,8 @@ uint64_t  __attribute__((export_name("TS_Watch_update_channel"))) TS_Watch_updat
        update_conv.is_owned = ptr_is_owned(update);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_conv);
        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 tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv));
+       return ret_conv;
 }
 
 uint64_tArray  __attribute__((export_name("TS_Watch_release_pending_monitor_events"))) TS_Watch_release_pending_monitor_events(uint64_t this_arg) {
@@ -5122,7 +5071,7 @@ void broadcast_transaction_LDKBroadcasterInterface_jcall(const void* this_arg, L
        int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
        memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
        Transaction_free(tx_var);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 19, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, (uint32_t)tx_arr, 0, 0, 0, 0, 0);
 }
 static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
        LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
@@ -5170,13 +5119,23 @@ static void LDKKeysInterface_JCalls_free(void* this_arg) {
 LDKCResult_SecretKeyNoneZ get_node_secret_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        uint32_t recipient_conv = LDKRecipient_to_js(recipient);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 20, recipient_conv, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 21, recipient_conv, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SecretKeyNoneZ ret_conv = *(LDKCResult_SecretKeyNoneZ*)(ret_ptr);
        FREE(untag_ptr(ret));
        return ret_conv;
 }
+LDKCResult_PublicKeyNoneZ get_node_id_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       uint32_t recipient_conv = LDKRecipient_to_js(recipient);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, recipient_conv, 0, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
 LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, LDKRecipient recipient, LDKPublicKey other_key, LDKCOption_ScalarZ tweak) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        uint32_t recipient_conv = LDKRecipient_to_js(recipient);
@@ -5185,7 +5144,7 @@ LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, L
        LDKCOption_ScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_ScalarZ), "LDKCOption_ScalarZ");
        *tweak_copy = tweak;
        uint64_t tweak_ref = tag_ptr(tweak_copy, true);
-       uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 21, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uubuuu(j_calls->instance_ptr, 23, recipient_conv, (uint32_t)other_key_arr, tweak_ref, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SharedSecretNoneZ ret_conv = *(LDKCResult_SharedSecretNoneZ*)(ret_ptr);
@@ -5194,7 +5153,7 @@ LDKCResult_SharedSecretNoneZ ecdh_LDKKeysInterface_jcall(const void* this_arg, L
 }
 LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 22, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 24, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -5203,7 +5162,7 @@ LDKCVec_u8Z get_destination_script_LDKKeysInterface_jcall(const void* this_arg)
 }
 LDKShutdownScript get_shutdown_scriptpubkey_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 23, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
        LDKShutdownScript ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -5214,7 +5173,7 @@ LDKSign get_channel_signer_LDKKeysInterface_jcall(const void* this_arg, bool inb
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
        jboolean inbound_conv = inbound;
        int64_t channel_value_satoshis_conv = channel_value_satoshis;
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 24, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 26, inbound_conv, channel_value_satoshis_conv, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKSign ret_conv = *(LDKSign*)(ret_ptr);
@@ -5223,7 +5182,7 @@ LDKSign get_channel_signer_LDKKeysInterface_jcall(const void* this_arg, bool inb
 }
 LDKThirtyTwoBytes get_secure_random_bytes_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 25, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, 0, 0, 0, 0, 0, 0);
        LDKThirtyTwoBytes ret_ref;
        CHECK(ret->arr_len == 32);
        memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
@@ -5234,7 +5193,7 @@ LDKCResult_SignDecodeErrorZ read_chan_signer_LDKKeysInterface_jcall(const void*
        LDKu8slice reader_var = reader;
        int8_tArray reader_arr = init_int8_tArray(reader_var.datalen, __LINE__);
        memcpy(reader_arr->elems, reader_var.data, reader_var.datalen);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 26, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, (uint32_t)reader_arr, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(ret_ptr);
@@ -5257,7 +5216,7 @@ LDKCResult_RecoverableSignatureNoneZ sign_invoice_LDKKeysInterface_jcall(const v
        
        FREE(invoice_data_var.data);
        uint32_t receipient_conv = LDKRecipient_to_js(receipient);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 27, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 29, (uint32_t)hrp_bytes_arr, (uint32_t)invoice_data_arr, receipient_conv, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
@@ -5266,7 +5225,7 @@ LDKCResult_RecoverableSignatureNoneZ sign_invoice_LDKKeysInterface_jcall(const v
 }
 LDKThirtyTwoBytes get_inbound_payment_key_material_LDKKeysInterface_jcall(const void* this_arg) {
        LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 28, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
        LDKThirtyTwoBytes ret_ref;
        CHECK(ret->arr_len == 32);
        memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
@@ -5284,6 +5243,7 @@ static inline LDKKeysInterface LDKKeysInterface_init (JSValue o) {
        LDKKeysInterface ret = {
                .this_arg = (void*) calls,
                .get_node_secret = get_node_secret_LDKKeysInterface_jcall,
+               .get_node_id = get_node_id_LDKKeysInterface_jcall,
                .ecdh = ecdh_LDKKeysInterface_jcall,
                .get_destination_script = get_destination_script_LDKKeysInterface_jcall,
                .get_shutdown_scriptpubkey = get_shutdown_scriptpubkey_LDKKeysInterface_jcall,
@@ -5311,6 +5271,16 @@ uint64_t  __attribute__((export_name("TS_KeysInterface_get_node_secret"))) TS_Ke
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_KeysInterface_get_node_id"))) TS_KeysInterface_get_node_id(uint64_t this_arg, uint32_t recipient) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg_ptr;
+       LDKRecipient recipient_conv = LDKRecipient_from_js(recipient);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = (this_arg_conv->get_node_id)(this_arg_conv->this_arg, recipient_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_KeysInterface_ecdh"))) TS_KeysInterface_ecdh(uint64_t this_arg, uint32_t recipient, int8_tArray other_key, uint64_t tweak) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -5430,7 +5400,7 @@ static void LDKFeeEstimator_JCalls_free(void* this_arg) {
 uint32_t get_est_sat_per_1000_weight_LDKFeeEstimator_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_uuuuuu(j_calls->instance_ptr, 29, confirmation_target_conv, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, confirmation_target_conv, 0, 0, 0, 0, 0);
 }
 static void LDKFeeEstimator_JCalls_cloned(LDKFeeEstimator* new_obj) {
        LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) new_obj->this_arg;
@@ -5497,16 +5467,14 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManager
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5525,16 +5493,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_get_err"))) TS_CResult_ChannelConfigDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelConfigDecodeErrorZ* owner_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelConfigDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5553,16 +5519,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_get_err"))) TS_CResult_OutPointDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OutPointDecodeErrorZ* owner_conv = (LDKCResult_OutPointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutPointDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5578,17 +5542,17 @@ static void LDKType_JCalls_free(void* this_arg) {
 }
 uint16_t type_id_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 30, 0, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
 }
 LDKStr debug_str_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 31, 0, 0, 0, 0, 0, 0);
+       jstring ret = (jstring)js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, 0, 0, 0, 0, 0, 0);
        LDKStr ret_conv = str_ref_to_owned_c(ret);
        return ret_conv;
 }
 LDKCVec_u8Z write_LDKType_jcall(const void* this_arg) {
        LDKType_JCalls *j_calls = (LDKType_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 32, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 34, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -5676,16 +5640,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_get_err"))) TS_CResult_COption_TypeZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_TypeZDecodeErrorZ* owner_conv = (LDKCResult_COption_TypeZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_TypeZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -5758,16 +5720,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_get_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InFlightHtlcsDecodeErrorZ* owner_conv = (LDKCResult_InFlightHtlcsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InFlightHtlcsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6140,16 +6100,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeError
 }
 
 static inline struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6180,16 +6138,14 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_COption_MonitorEventZDecodeErrorZ* owner_conv = (LDKCResult_COption_MonitorEventZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6208,16 +6164,14 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_get_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_HTLCUpdateDecodeErrorZ* owner_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HTLCUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6495,16 +6449,14 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitor
 }
 
 static inline struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6535,6 +6487,110 @@ static inline LDKCVec_C2Tuple_PublicKeyTypeZZ CVec_C2Tuple_PublicKeyTypeZZ_clone
        }
        return ret;
 }
+typedef struct LDKCustomOnionMessageContents_JCalls {
+       atomic_size_t refcnt;
+       uint32_t instance_ptr;
+} LDKCustomOnionMessageContents_JCalls;
+static void LDKCustomOnionMessageContents_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               FREE(j_calls);
+       }
+}
+uint64_t tlv_type_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+}
+LDKCVec_u8Z write_LDKCustomOnionMessageContents_jcall(const void* this_arg) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) this_arg;
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, 0, 0, 0, 0, 0, 0);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = ret->arr_len;
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(ret_ref.data, ret->elems, ret_ref.datalen); FREE(ret);
+       return ret_ref;
+}
+static void LDKCustomOnionMessageContents_JCalls_cloned(LDKCustomOnionMessageContents* new_obj) {
+       LDKCustomOnionMessageContents_JCalls *j_calls = (LDKCustomOnionMessageContents_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageContents LDKCustomOnionMessageContents_init (JSValue o) {
+       LDKCustomOnionMessageContents_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageContents_JCalls), "LDKCustomOnionMessageContents_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       calls->instance_ptr = o;
+
+       LDKCustomOnionMessageContents ret = {
+               .this_arg = (void*) calls,
+               .tlv_type = tlv_type_LDKCustomOnionMessageContents_jcall,
+               .write = write_LDKCustomOnionMessageContents_jcall,
+               .cloned = LDKCustomOnionMessageContents_JCalls_cloned,
+               .free = LDKCustomOnionMessageContents_JCalls_free,
+       };
+       return ret;
+}
+uint64_t  __attribute__((export_name("TS_LDKCustomOnionMessageContents_new"))) TS_LDKCustomOnionMessageContents_new(JSValue o) {
+       LDKCustomOnionMessageContents *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *res_ptr = LDKCustomOnionMessageContents_init(o);
+       return tag_ptr(res_ptr, true);
+}
+int64_t  __attribute__((export_name("TS_CustomOnionMessageContents_tlv_type"))) TS_CustomOnionMessageContents_tlv_type(uint64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       int64_t ret_conv = (this_arg_conv->tlv_type)(this_arg_conv->this_arg);
+       return ret_conv;
+}
+
+int8_tArray  __attribute__((export_name("TS_CustomOnionMessageContents_write"))) TS_CustomOnionMessageContents_write(uint64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageContents* this_arg_conv = (LDKCustomOnionMessageContents*)this_arg_ptr;
+       LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+       int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+       memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+uint32_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr"))) TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(uint64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_CustomOnionMessageContentsZ_Some: return 0;
+               case LDKCOption_CustomOnionMessageContentsZ_None: return 1;
+               default: abort();
+       }
+}
+uint64_t __attribute__((export_name("TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some"))) TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(uint64_t ptr) {
+       LDKCOption_CustomOnionMessageContentsZ *obj = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(ptr);
+       assert(obj->tag == LDKCOption_CustomOnionMessageContentsZ_Some);
+                       LDKCustomOnionMessageContents* some_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+                       *some_ret = CustomOnionMessageContents_clone(&obj->some);
+       return tag_ptr(some_ret, true);
+}
+static inline struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return COption_CustomOnionMessageContentsZ_clone(&*owner->contents.result);
+}
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(uint64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(uint64_t owner) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* owner_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 uint32_t __attribute__((export_name("TS_LDKCOption_NetAddressZ_ty_from_ptr"))) TS_LDKCOption_NetAddressZ_ty_from_ptr(uint64_t ptr) {
        LDKCOption_NetAddressZ *obj = (LDKCOption_NetAddressZ*)untag_ptr(ptr);
        switch(obj->tag) {
@@ -6630,7 +6686,8 @@ uint32_t __attribute__((export_name("TS_LDKSendError_ty_from_ptr"))) TS_LDKSendE
                case LDKSendError_TooBigPacket: return 1;
                case LDKSendError_TooFewBlindedHops: return 2;
                case LDKSendError_InvalidFirstHop: return 3;
-               case LDKSendError_BufferFull: return 4;
+               case LDKSendError_InvalidMessage: return 4;
+               case LDKSendError_BufferFull: return 5;
                default: abort();
        }
 }
@@ -6661,6 +6718,51 @@ uint64_t  __attribute__((export_name("TS_CResult_NoneSendErrorZ_get_err"))) TS_C
        return ret_ref;
 }
 
+uint32_t __attribute__((export_name("TS_LDKGraphSyncError_ty_from_ptr"))) TS_LDKGraphSyncError_ty_from_ptr(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKGraphSyncError_DecodeError: return 0;
+               case LDKGraphSyncError_LightningError: return 1;
+               default: abort();
+       }
+}
+uint64_t __attribute__((export_name("TS_LDKGraphSyncError_DecodeError_get_decode_error"))) TS_LDKGraphSyncError_DecodeError_get_decode_error(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       assert(obj->tag == LDKGraphSyncError_DecodeError);
+                       uint64_t decode_error_ref = tag_ptr(&obj->decode_error, false);
+       return decode_error_ref;
+}
+uint64_t __attribute__((export_name("TS_LDKGraphSyncError_LightningError_get_lightning_error"))) TS_LDKGraphSyncError_LightningError_get_lightning_error(uint64_t ptr) {
+       LDKGraphSyncError *obj = (LDKGraphSyncError*)untag_ptr(ptr);
+       assert(obj->tag == LDKGraphSyncError_LightningError);
+                       LDKLightningError lightning_error_var = obj->lightning_error;
+                       uint64_t lightning_error_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(lightning_error_var);
+                       lightning_error_ref = tag_ptr(lightning_error_var.inner, false);
+       return lightning_error_ref;
+}
+static inline uint32_t CResult_u32GraphSyncErrorZ_get_ok(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+int32_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_get_ok"))) TS_CResult_u32GraphSyncErrorZ_get_ok(uint64_t owner) {
+       LDKCResult_u32GraphSyncErrorZ* owner_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(owner);
+       int32_t ret_conv = CResult_u32GraphSyncErrorZ_get_ok(owner_conv);
+       return ret_conv;
+}
+
+static inline struct LDKGraphSyncError CResult_u32GraphSyncErrorZ_get_err(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return GraphSyncError_clone(&*owner->contents.err);
+}
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_get_err"))) TS_CResult_u32GraphSyncErrorZ_get_err(uint64_t owner) {
+       LDKCResult_u32GraphSyncErrorZ* owner_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(owner);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = CResult_u32GraphSyncErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline void CResult_NoneErrorZ_get_ok(LDKCResult_NoneErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
@@ -6693,16 +6795,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_ok")
 }
 
 static inline struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_get_err"))) TS_CResult_NetAddressDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NetAddressDecodeErrorZ* owner_conv = (LDKCResult_NetAddressDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NetAddressDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6749,16 +6849,14 @@ uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_get_err"))) TS_CResult_AcceptChannelDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_AcceptChannelDecodeErrorZ* owner_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AcceptChannelDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6777,16 +6875,14 @@ uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErr
 }
 
 static inline struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* owner_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6805,16 +6901,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_
 }
 
 static inline struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_get_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelReestablishDecodeErrorZ* owner_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReestablishDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6833,16 +6927,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ClosingSignedDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6861,16 +6953,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* owner_conv = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6889,16 +6979,14 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_ge
 }
 
 static inline struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_get_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_CommitmentSignedDecodeErrorZ* owner_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_CommitmentSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6917,16 +7005,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_get_err"))) TS_CResult_FundingCreatedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FundingCreatedDecodeErrorZ* owner_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingCreatedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6945,16 +7031,14 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_get_err"))) TS_CResult_FundingSignedDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_FundingSignedDecodeErrorZ* owner_conv = (LDKCResult_FundingSignedDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_FundingSignedDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -6973,16 +7057,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_ChannelReadyDecodeErrorZ_get_err(LDKCResult_ChannelReadyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_get_err"))) TS_CResult_ChannelReadyDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelReadyDecodeErrorZ* owner_conv = (LDKCResult_ChannelReadyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelReadyDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7001,16 +7083,14 @@ uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_get_err"))) TS_CResult_InitDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_InitDecodeErrorZ* owner_conv = (LDKCResult_InitDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_InitDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InitDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7029,16 +7109,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_ok"
 }
 
 static inline struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_get_err"))) TS_CResult_OpenChannelDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OpenChannelDecodeErrorZ* owner_conv = (LDKCResult_OpenChannelDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OpenChannelDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7057,16 +7135,14 @@ uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_get_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_RevokeAndACKDecodeErrorZ* owner_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevokeAndACKDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7085,16 +7161,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_ok")))
 }
 
 static inline struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_get_err"))) TS_CResult_ShutdownDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ShutdownDecodeErrorZ* owner_conv = (LDKCResult_ShutdownDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ShutdownDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7113,16 +7187,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFailHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7141,16 +7213,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7169,16 +7239,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_ok"))
 }
 
 static inline struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_get_err"))) TS_CResult_UpdateFeeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFeeDecodeErrorZ* owner_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFeeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7197,16 +7265,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7225,16 +7291,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UpdateAddHTLCDecodeErrorZ* owner_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7253,16 +7317,14 @@ uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_OnionMessageDecodeErrorZ_get_err(LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_get_err"))) TS_CResult_OnionMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_OnionMessageDecodeErrorZ* owner_conv = (LDKCResult_OnionMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OnionMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7281,16 +7343,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_get_err"))) TS_CResult_PingDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PingDecodeErrorZ* owner_conv = (LDKCResult_PingDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PingDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PingDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7309,16 +7369,14 @@ uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_ok"))) TS_
 }
 
 static inline struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_get_err"))) TS_CResult_PongDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_PongDecodeErrorZ* owner_conv = (LDKCResult_PongDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_PongDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PongDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7337,16 +7395,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDeco
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7365,16 +7421,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ
 }
 
 static inline struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7393,16 +7447,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7421,16 +7473,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_o
 }
 
 static inline struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_get_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ChannelUpdateDecodeErrorZ* owner_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelUpdateDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7449,16 +7499,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_ok
 }
 
 static inline struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_get_err"))) TS_CResult_ErrorMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ErrorMessageDecodeErrorZ* owner_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ErrorMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7477,16 +7525,14 @@ uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_
 }
 
 static inline struct LDKDecodeError CResult_WarningMessageDecodeErrorZ_get_err(LDKCResult_WarningMessageDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_get_err"))) TS_CResult_WarningMessageDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_WarningMessageDecodeErrorZ* owner_conv = (LDKCResult_WarningMessageDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_WarningMessageDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7505,16 +7551,14 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeE
 }
 
 static inline struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7533,16 +7577,14 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_ge
 }
 
 static inline struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_get_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_NodeAnnouncementDecodeErrorZ* owner_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_NodeAnnouncementDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7561,16 +7603,14 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeError
 }
 
 static inline struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* owner_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7589,16 +7629,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeEr
 }
 
 static inline struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* owner_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7617,16 +7655,14 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_get_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_QueryChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_QueryChannelRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7645,16 +7681,14 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_g
 }
 
 static inline struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_ReplyChannelRangeDecodeErrorZ* owner_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7673,16 +7707,14 @@ uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErro
 }
 
 static inline struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner){
-       LDKDecodeError ret = *owner->contents.err;
-       ret.is_owned = false;
-       return ret;
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
 uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(uint64_t owner) {
        LDKCResult_GossipTimestampFilterDecodeErrorZ* owner_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError ret_var = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -7743,7 +7775,7 @@ void register_tx_LDKFilter_jcall(const void* this_arg, const uint8_t (* txid)[32
        LDKu8slice script_pubkey_var = script_pubkey;
        int8_tArray script_pubkey_arr = init_int8_tArray(script_pubkey_var.datalen, __LINE__);
        memcpy(script_pubkey_arr->elems, script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 33, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 37, (uint32_t)txid_arr, (uint32_t)script_pubkey_arr, 0, 0, 0, 0);
 }
 void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput output) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
@@ -7751,7 +7783,7 @@ void register_output_LDKFilter_jcall(const void* this_arg, LDKWatchedOutput outp
        uint64_t output_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(output_var);
        output_ref = tag_ptr(output_var.inner, output_var.is_owned);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 34, output_ref, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 38, output_ref, 0, 0, 0, 0, 0);
 }
 static void LDKFilter_JCalls_cloned(LDKFilter* new_obj) {
        LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) new_obj->this_arg;
@@ -7864,7 +7896,7 @@ static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
 }
 LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
        LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 35, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 39, 0, 0, 0, 0, 0, 0);
        LDKCVec_MessageSendEventZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -7937,7 +7969,7 @@ LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageProvider_jcall(const
        LDKOnionMessageProvider_JCalls *j_calls = (LDKOnionMessageProvider_JCalls*) this_arg;
        int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 36, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 40, (uint32_t)peer_node_id_arr, 0, 0, 0, 0, 0);
        LDKOnionMessage ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -7994,7 +8026,7 @@ void handle_event_LDKEventHandler_jcall(const void* this_arg, const LDKEvent * e
        LDKEvent *ret_event = MALLOC(sizeof(LDKEvent), "LDKEvent ret conversion");
        *ret_event = Event_clone(event);
        uint64_t ref_event = tag_ptr(ret_event, true);
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 37, ref_event, 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 41, ref_event, 0, 0, 0, 0, 0);
 }
 static void LDKEventHandler_JCalls_cloned(LDKEventHandler* new_obj) {
        LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) new_obj->this_arg;
@@ -8039,7 +8071,7 @@ void process_pending_events_LDKEventsProvider_jcall(const void* this_arg, LDKEve
        LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
        LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
        *handler_ret = handler;
-       js_invoke_function_buuuuu(j_calls->instance_ptr, 38, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 42, tag_ptr(handler_ret, true), 0, 0, 0, 0, 0);
 }
 static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
        LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
@@ -8103,7 +8135,7 @@ uint64_t channel_penalty_msat_LDKScore_jcall(const void* this_arg, uint64_t shor
        uint64_t usage_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(usage_var);
        usage_ref = tag_ptr(usage_var.inner, usage_var.is_owned);
-       return js_invoke_function_bbbbuu(j_calls->instance_ptr, 39, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
+       return js_invoke_function_bbbbuu(j_calls->instance_ptr, 43, short_channel_id_conv, source_ref, target_ref, usage_ref, 0, 0);
 }
 void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8121,7 +8153,7 @@ void payment_path_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path,
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 40, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 44, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8138,7 +8170,7 @@ void payment_path_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ pa
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 41, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8156,7 +8188,7 @@ void probe_failed_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path, uint64_
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 42, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 46, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
@@ -8173,11 +8205,11 @@ void probe_successful_LDKScore_jcall(void* this_arg, LDKCVec_RouteHopZ path) {
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 43, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 47, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
        LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 44, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 48, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -8352,7 +8384,7 @@ static void LDKLockableScore_JCalls_free(void* this_arg) {
 }
 LDKScore lock_LDKLockableScore_jcall(const void* this_arg) {
        LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 45, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 49, 0, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKScore ret_conv = *(LDKScore*)(ret_ptr);
@@ -8406,7 +8438,7 @@ static void LDKWriteableScore_JCalls_free(void* this_arg) {
 }
 LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
        LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 46, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
        LDKCVec_u8Z ret_ref;
        ret_ref.datalen = ret->arr_len;
        ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
@@ -8465,7 +8497,7 @@ LDKCResult_NoneErrorZ persist_manager_LDKPersister_jcall(const void* this_arg, c
        // WARNING: we may need a move here but no clone is available for LDKChannelManager
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
        channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 47, channel_manager_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 51, channel_manager_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8479,7 +8511,7 @@ LDKCResult_NoneErrorZ persist_graph_LDKPersister_jcall(const void* this_arg, con
        // WARNING: we may need a move here but no clone is available for LDKNetworkGraph
        CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
        network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 48, network_graph_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 52, network_graph_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8490,7 +8522,7 @@ LDKCResult_NoneErrorZ persist_scorer_LDKPersister_jcall(const void* this_arg, co
        LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
        // WARNING: This object doesn't live past this scope, needs clone!
        uint64_t ret_scorer = tag_ptr(scorer, false);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 49, ret_scorer, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 53, ret_scorer, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneErrorZ ret_conv = *(LDKCResult_NoneErrorZ*)(ret_ptr);
@@ -8572,7 +8604,7 @@ static void LDKFutureCallback_JCalls_free(void* this_arg) {
 }
 void call_LDKFutureCallback_jcall(const void* this_arg) {
        LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 50, 0, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, 0, 0, 0, 0, 0, 0);
 }
 static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
        LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
@@ -8628,7 +8660,7 @@ void filtered_block_connected_LDKListen_jcall(const void* this_arg, const uint8_
        
        FREE(txdata_var.data);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 51, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
 }
 void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
@@ -8636,14 +8668,14 @@ void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uin
        int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
        memcpy(block_arr->elems, block_var.data, block_var.datalen);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 52, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)block_arr, height_conv, 0, 0, 0, 0);
 }
 void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
        int8_tArray header_arr = init_int8_tArray(80, __LINE__);
        memcpy(header_arr->elems, *header, 80);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 53, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
 }
 static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
        LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
@@ -8743,24 +8775,24 @@ void transactions_confirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t
        
        FREE(txdata_var.data);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 54, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 58, (uint32_t)header_arr, (uint32_t)txdata_arr, height_conv, 0, 0, 0);
 }
 void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
        int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
        memcpy(txid_arr->elems, *txid, 32);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 55, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 59, (uint32_t)txid_arr, 0, 0, 0, 0, 0);
 }
 void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
        int8_tArray header_arr = init_int8_tArray(80, __LINE__);
        memcpy(header_arr->elems, *header, 80);
        int32_t height_conv = height;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 56, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 60, (uint32_t)header_arr, height_conv, 0, 0, 0, 0);
 }
 LDKCVec_TxidZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
        LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
-       ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 57, 0, 0, 0, 0, 0, 0);
+       ptrArray ret = (ptrArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 61, 0, 0, 0, 0, 0, 0);
        LDKCVec_TxidZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -8879,7 +8911,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        LDKOutPoint channel_id_var = channel_id;
        uint64_t channel_id_ref = 0;
@@ -8894,14 +8926,11 @@ LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_LDKPersist_jcall(con
        uint64_t update_id_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
-       uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 58, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbbuuu(j_calls->instance_ptr, 62, channel_id_ref, data_ref, update_id_ref, 0, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        LDKOutPoint channel_id_var = channel_id;
        uint64_t channel_id_ref = 0;
@@ -8921,11 +8950,8 @@ LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_LDKPersist_jcal
        uint64_t update_id_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_var);
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
-       uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 59, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
-       void* ret_ptr = untag_ptr(ret);
-       CHECK_ACCESS(ret_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(ret_ptr);
-       FREE(untag_ptr(ret));
+       uint64_t ret = js_invoke_function_bbbbuu(j_calls->instance_ptr, 63, channel_id_ref, update_ref, data_ref, update_id_ref, 0, 0);
+       LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_js(ret);
        return ret_conv;
 }
 static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
@@ -8950,7 +8976,7 @@ uint64_t  __attribute__((export_name("TS_LDKPersist_new"))) TS_LDKPersist_new(JS
        *res_ptr = LDKPersist_init(o);
        return tag_ptr(res_ptr, true);
 }
-uint64_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
+uint32_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Persist_persist_new_channel(uint64_t this_arg, uint64_t channel_id, uint64_t data, uint64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -8969,12 +8995,11 @@ uint64_t  __attribute__((export_name("TS_Persist_persist_new_channel"))) TS_Pers
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
-uint64_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
+uint32_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS_Persist_update_persisted_channel(uint64_t this_arg, uint64_t channel_id, uint64_t update, uint64_t data, uint64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
@@ -8998,9 +9023,8 @@ uint64_t  __attribute__((export_name("TS_Persist_update_persisted_channel"))) TS
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv);
-       return tag_ptr(ret_conv, true);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js((this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, &update_conv, &data_conv, update_id_conv));
+       return ret_conv;
 }
 
 typedef struct LDKChannelMessageHandler_JCalls {
@@ -9027,7 +9051,7 @@ void handle_open_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LD
        msg_var = OpenChannel_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 60, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9042,7 +9066,7 @@ void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = AcceptChannel_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 61, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9053,7 +9077,7 @@ void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = FundingCreated_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 62, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9064,7 +9088,7 @@ void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = FundingSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 63, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9075,7 +9099,7 @@ void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, L
        msg_var = ChannelReady_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 64, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9091,7 +9115,7 @@ void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPub
        msg_var = Shutdown_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubbuuu(j_calls->instance_ptr, 65, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
+       js_invoke_function_ubbuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, their_features_ref, msg_ref, 0, 0, 0);
 }
 void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9102,7 +9126,7 @@ void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = ClosingSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 66, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9113,7 +9137,7 @@ void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = UpdateAddHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 67, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9124,7 +9148,7 @@ void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_
        msg_var = UpdateFulfillHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 68, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9135,7 +9159,7 @@ void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg
        msg_var = UpdateFailHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 69, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9146,7 +9170,7 @@ void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void
        msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 70, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9157,7 +9181,7 @@ void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_ar
        msg_var = CommitmentSigned_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 71, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9168,7 +9192,7 @@ void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = RevokeAndACK_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 72, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9179,7 +9203,7 @@ void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKP
        msg_var = UpdateFee_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 73, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9190,16 +9214,16 @@ void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* t
        msg_var = AnnouncementSignatures_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 74, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void peer_disconnected_LDKChannelMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
        jboolean no_connection_possible_conv = no_connection_possible;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 75, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
 }
-void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -9208,7 +9232,12 @@ void peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPubl
        msg_var = Init_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 76, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 80, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9219,7 +9248,7 @@ void handle_channel_reestablish_LDKChannelMessageHandler_jcall(const void* this_
        msg_var = ChannelReestablish_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 77, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9230,7 +9259,7 @@ void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg,
        msg_var = ChannelUpdate_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 78, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 82, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
@@ -9241,11 +9270,11 @@ void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublic
        msg_var = ErrorMessage_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 79, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 83, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
 LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 80, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 84, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9256,7 +9285,7 @@ LDKInitFeatures provided_init_features_LDKChannelMessageHandler_jcall(const void
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 81, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 85, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9558,7 +9587,7 @@ void  __attribute__((export_name("TS_ChannelMessageHandler_peer_disconnected")))
        (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
 
-void  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
+uint64_t  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS_ChannelMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
@@ -9570,7 +9599,9 @@ void  __attribute__((export_name("TS_ChannelMessageHandler_peer_connected"))) TS
        msg_conv.is_owned = ptr_is_owned(msg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
        msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 void  __attribute__((export_name("TS_ChannelMessageHandler_handle_channel_reestablish"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
@@ -9661,7 +9692,7 @@ LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler
        msg_var = NodeAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 82, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 86, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9675,7 +9706,7 @@ LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHand
        msg_var = ChannelAnnouncement_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 83, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 87, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9689,7 +9720,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc
        msg_var = ChannelUpdate_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 84, msg_ref, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 88, msg_ref, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
@@ -9699,7 +9730,7 @@ LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jc
 LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int64_t starting_point_conv = starting_point;
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 85, starting_point_conv, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 89, starting_point_conv, 0, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
@@ -9710,14 +9741,14 @@ LDKNodeAnnouncement get_next_node_announcement_LDKRoutingMessageHandler_jcall(co
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int8_tArray starting_point_arr = init_int8_tArray(33, __LINE__);
        memcpy(starting_point_arr->elems, starting_point.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 86, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 90, (uint32_t)starting_point_arr, 0, 0, 0, 0, 0);
        LDKNodeAnnouncement ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
        return ret_conv;
 }
-void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKRoutingMessageHandler_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_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -9726,7 +9757,12 @@ void peer_connected_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPubl
        init_var = Init_clone(&init_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 87, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
@@ -9736,7 +9772,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_channel_range_LDKRoutingMessageHandl
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 88, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 92, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9751,7 +9787,7 @@ LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_LDKRoutingMess
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 89, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9766,7 +9802,7 @@ LDKCResult_NoneLightningErrorZ handle_query_channel_range_LDKRoutingMessageHandl
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 90, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9781,7 +9817,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH
        uint64_t msg_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 91, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, msg_ref, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -9790,7 +9826,7 @@ LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_LDKRoutingMessageH
 }
 LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 92, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9801,7 +9837,7 @@ LDKInitFeatures provided_init_features_LDKRoutingMessageHandler_jcall(const void
        LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 93, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -9909,7 +9945,7 @@ uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_get_next_node_ann
        return ret_ref;
 }
 
-void  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS_RoutingMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
@@ -9921,7 +9957,9 @@ void  __attribute__((export_name("TS_RoutingMessageHandler_peer_connected"))) TS
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 uint64_t  __attribute__((export_name("TS_RoutingMessageHandler_handle_reply_channel_range"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint64_t this_arg, int8_tArray their_node_id, uint64_t msg) {
@@ -10037,9 +10075,9 @@ void handle_onion_message_LDKOnionMessageHandler_jcall(const void* this_arg, LDK
        msg_var = OnionMessage_clone(&msg_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
        msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 94, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 98, (uint32_t)peer_node_id_arr, msg_ref, 0, 0, 0, 0);
 }
-void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+LDKCResult_NoneNoneZ peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
@@ -10048,18 +10086,23 @@ void peer_connected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublic
        init_var = Init_clone(&init_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
        init_ref = tag_ptr(init_var.inner, init_var.is_owned);
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 95, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_ubuuuu(j_calls->instance_ptr, 99, (uint32_t)their_node_id_arr, init_ref, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
 }
 void peer_disconnected_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
        jboolean no_connection_possible_conv = no_connection_possible;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 96, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 100, (uint32_t)their_node_id_arr, no_connection_possible_conv, 0, 0, 0, 0);
 }
 LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 97, 0, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
        LDKNodeFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -10070,7 +10113,7 @@ LDKInitFeatures provided_init_features_LDKOnionMessageHandler_jcall(const void*
        LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
        int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 98, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)their_node_id_arr, 0, 0, 0, 0, 0);
        LDKInitFeatures ret_conv;
        ret_conv.inner = untag_ptr(ret);
        ret_conv.is_owned = ptr_is_owned(ret);
@@ -10120,7 +10163,7 @@ void  __attribute__((export_name("TS_OnionMessageHandler_handle_onion_message"))
        (this_arg_conv->handle_onion_message)(this_arg_conv->this_arg, peer_node_id_ref, &msg_conv);
 }
 
-void  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
+uint64_t  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_OnionMessageHandler_peer_connected(uint64_t this_arg, int8_tArray their_node_id, uint64_t init) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKOnionMessageHandler* this_arg_conv = (LDKOnionMessageHandler*)this_arg_ptr;
@@ -10132,7 +10175,9 @@ void  __attribute__((export_name("TS_OnionMessageHandler_peer_connected"))) TS_O
        init_conv.is_owned = ptr_is_owned(init);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(init_conv);
        init_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 void  __attribute__((export_name("TS_OnionMessageHandler_peer_disconnected"))) TS_OnionMessageHandler_peer_disconnected(uint64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
@@ -10186,7 +10231,7 @@ LDKCResult_COption_TypeZDecodeErrorZ read_LDKCustomMessageReader_jcall(const voi
        LDKu8slice buffer_var = buffer;
        int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
        memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
-       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 99, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
@@ -10244,7 +10289,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca
        *msg_ret = msg;
        int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
        memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 100, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(msg_ret, true), (uint32_t)sender_node_id_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
@@ -10253,7 +10298,7 @@ LDKCResult_NoneLightningErrorZ handle_custom_message_LDKCustomMessageHandler_jca
 }
 LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
        LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 101, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
        LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -10334,6 +10379,84 @@ uint64_tArray  __attribute__((export_name("TS_CustomMessageHandler_get_and_clear
        return ret_arr;
 }
 
+typedef struct LDKCustomOnionMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       uint32_t instance_ptr;
+} LDKCustomOnionMessageHandler_JCalls;
+static void LDKCustomOnionMessageHandler_JCalls_free(void* this_arg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               FREE(j_calls);
+       }
+}
+void handle_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, LDKCustomOnionMessageContents msg) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       LDKCustomOnionMessageContents* msg_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *msg_ret = msg;
+       js_invoke_function_buuuuu(j_calls->instance_ptr, 106, tag_ptr(msg_ret, true), 0, 0, 0, 0, 0);
+}
+LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message_LDKCustomOnionMessageHandler_jcall(const void* this_arg, uint64_t message_type, LDKu8slice buffer) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
+       int64_t message_type_conv = message_type;
+       LDKu8slice buffer_var = buffer;
+       int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
+       memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 107, message_type_conv, (uint32_t)buffer_arr, 0, 0, 0, 0);
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       return ret_conv;
+}
+static void LDKCustomOnionMessageHandler_JCalls_cloned(LDKCustomOnionMessageHandler* new_obj) {
+       LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKCustomOnionMessageHandler LDKCustomOnionMessageHandler_init (JSValue o) {
+       LDKCustomOnionMessageHandler_JCalls *calls = MALLOC(sizeof(LDKCustomOnionMessageHandler_JCalls), "LDKCustomOnionMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       calls->instance_ptr = o;
+
+       LDKCustomOnionMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_custom_message = handle_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .read_custom_message = read_custom_message_LDKCustomOnionMessageHandler_jcall,
+               .free = LDKCustomOnionMessageHandler_JCalls_free,
+       };
+       return ret;
+}
+uint64_t  __attribute__((export_name("TS_LDKCustomOnionMessageHandler_new"))) TS_LDKCustomOnionMessageHandler_new(JSValue o) {
+       LDKCustomOnionMessageHandler *res_ptr = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *res_ptr = LDKCustomOnionMessageHandler_init(o);
+       return tag_ptr(res_ptr, true);
+}
+void  __attribute__((export_name("TS_CustomOnionMessageHandler_handle_custom_message"))) TS_CustomOnionMessageHandler_handle_custom_message(uint64_t this_arg, uint64_t msg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
+       (this_arg_conv->handle_custom_message)(this_arg_conv->this_arg, msg_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_CustomOnionMessageHandler_read_custom_message"))) TS_CustomOnionMessageHandler_read_custom_message(uint64_t this_arg, int64_t message_type, int8_tArray buffer) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKCustomOnionMessageHandler* this_arg_conv = (LDKCustomOnionMessageHandler*)this_arg_ptr;
+       LDKu8slice buffer_ref;
+       buffer_ref.datalen = buffer->arr_len;
+       buffer_ref.data = buffer->elems;
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_custom_message)(this_arg_conv->this_arg, message_type, buffer_ref);
+       FREE(buffer);
+       return tag_ptr(ret_conv, true);
+}
+
 typedef struct LDKSocketDescriptor_JCalls {
        atomic_size_t refcnt;
        uint32_t instance_ptr;
@@ -10350,21 +10473,21 @@ uintptr_t send_data_LDKSocketDescriptor_jcall(void* this_arg, LDKu8slice data, b
        int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
        memcpy(data_arr->elems, data_var.data, data_var.datalen);
        jboolean resume_read_conv = resume_read;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 102, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 108, (uint32_t)data_arr, resume_read_conv, 0, 0, 0, 0);
 }
 void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 103, 0, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 109, 0, 0, 0, 0, 0, 0);
 }
 bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
        *other_arg_clone = SocketDescriptor_clone(other_arg);
-       return js_invoke_function_buuuuu(j_calls->instance_ptr, 104, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
+       return js_invoke_function_buuuuu(j_calls->instance_ptr, 110, tag_ptr(other_arg_clone, true), 0, 0, 0, 0, 0);
 }
 uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 105, 0, 0, 0, 0, 0, 0);
+       return js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, 0, 0, 0, 0, 0, 0);
 }
 static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
        LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
@@ -10526,7 +10649,7 @@ static void LDKPayer_JCalls_free(void* this_arg) {
 }
 LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
-       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 106, 0, 0, 0, 0, 0, 0);
+       int8_tArray ret = (int8_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 112, 0, 0, 0, 0, 0, 0);
        LDKPublicKey ret_ref;
        CHECK(ret->arr_len == 33);
        memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
@@ -10534,7 +10657,7 @@ LDKPublicKey node_id_LDKPayer_jcall(const void* this_arg) {
 }
 LDKCVec_ChannelDetailsZ first_hops_LDKPayer_jcall(const void* this_arg) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
-       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 107, 0, 0, 0, 0, 0, 0);
+       uint64_tArray ret = (uint64_tArray)js_invoke_function_uuuuuu(j_calls->instance_ptr, 113, 0, 0, 0, 0, 0, 0);
        LDKCVec_ChannelDetailsZ ret_constr;
        ret_constr.datalen = ret->arr_len;
        if (ret_constr.datalen > 0)
@@ -10564,7 +10687,7 @@ LDKCResult_PaymentIdPaymentSendFailureZ send_payment_LDKPayer_jcall(const void*
        memcpy(payment_hash_arr->elems, payment_hash.data, 32);
        int8_tArray payment_secret_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_secret_arr->elems, payment_secret.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 108, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 114, route_ref, (uint32_t)payment_hash_arr, (uint32_t)payment_secret_arr, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
@@ -10580,7 +10703,7 @@ LDKCResult_PaymentIdPaymentSendFailureZ send_spontaneous_payment_LDKPayer_jcall(
        route_ref = tag_ptr(route_var.inner, route_var.is_owned);
        int8_tArray payment_preimage_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_preimage_arr->elems, payment_preimage.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 109, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 115, route_ref, (uint32_t)payment_preimage_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_PaymentIdPaymentSendFailureZ ret_conv = *(LDKCResult_PaymentIdPaymentSendFailureZ*)(ret_ptr);
@@ -10596,7 +10719,7 @@ LDKCResult_NonePaymentSendFailureZ retry_payment_LDKPayer_jcall(const void* this
        route_ref = tag_ptr(route_var.inner, route_var.is_owned);
        int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_id_arr->elems, payment_id.data, 32);
-       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 110, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
+       uint64_t ret = js_invoke_function_buuuuu(j_calls->instance_ptr, 116, route_ref, (uint32_t)payment_id_arr, 0, 0, 0, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_NonePaymentSendFailureZ ret_conv = *(LDKCResult_NonePaymentSendFailureZ*)(ret_ptr);
@@ -10607,7 +10730,7 @@ void abandon_payment_LDKPayer_jcall(const void* this_arg, LDKThirtyTwoBytes paym
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) this_arg;
        int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
        memcpy(payment_id_arr->elems, payment_id.data, 32);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 111, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 117, (uint32_t)payment_id_arr, 0, 0, 0, 0, 0);
 }
 static void LDKPayer_JCalls_cloned(LDKPayer* new_obj) {
        LDKPayer_JCalls *j_calls = (LDKPayer_JCalls*) new_obj->this_arg;
@@ -10768,7 +10891,7 @@ LDKCResult_RouteLightningErrorZ find_route_LDKRouter_jcall(const void* this_arg,
        uint64_t inflight_htlcs_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
        inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
-       uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 112, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
+       uint64_t ret = js_invoke_function_ubuubu(j_calls->instance_ptr, 118, (uint32_t)payer_arr, route_params_ref, (uint32_t)payment_hash_arr, (uint32_t)first_hops_arr, inflight_htlcs_ref, 0);
        void* ret_ptr = untag_ptr(ret);
        CHECK_ACCESS(ret_ptr);
        LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
@@ -10791,7 +10914,7 @@ void notify_payment_path_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_Ro
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 113, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 119, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10808,7 +10931,7 @@ void notify_payment_path_successful_LDKRouter_jcall(const void* this_arg, LDKCVe
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 114, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 120, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10825,7 +10948,7 @@ void notify_payment_probe_successful_LDKRouter_jcall(const void* this_arg, LDKCV
        }
        
        FREE(path_var.data);
-       js_invoke_function_uuuuuu(j_calls->instance_ptr, 115, (uint32_t)path_arr, 0, 0, 0, 0, 0);
+       js_invoke_function_uuuuuu(j_calls->instance_ptr, 121, (uint32_t)path_arr, 0, 0, 0, 0, 0);
 }
 void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_RouteHopZ path, uint64_t short_channel_id) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
@@ -10843,7 +10966,7 @@ void notify_payment_probe_failed_LDKRouter_jcall(const void* this_arg, LDKCVec_R
        
        FREE(path_var.data);
        int64_t short_channel_id_conv = short_channel_id;
-       js_invoke_function_ubuuuu(j_calls->instance_ptr, 116, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
+       js_invoke_function_ubuuuu(j_calls->instance_ptr, 122, (uint32_t)path_arr, short_channel_id_conv, 0, 0, 0, 0);
 }
 static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
        LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
@@ -11196,11 +11319,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BlindedRouteDecodeErrorZ_err"))) TS_CResult_BlindedRouteDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedRouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedRouteDecodeErrorZ), "LDKCResult_BlindedRouteDecodeErrorZ");
        *ret_conv = CResult_BlindedRouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11234,11 +11356,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BlindedHopDecodeErrorZ_err"))) TS_CResult_BlindedHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BlindedHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopDecodeErrorZ), "LDKCResult_BlindedHopDecodeErrorZ");
        *ret_conv = CResult_BlindedHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11316,11 +11437,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err"))) TS_CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ), "LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ");
        *ret_conv = CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11469,11 +11589,10 @@ uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_TxCreationKeysDecodeErrorZ_err"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
        *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11524,11 +11643,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelPublicKeysDecodeErrorZ_err"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
        *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11673,11 +11791,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
        *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11743,11 +11860,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionP
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11798,11 +11914,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDec
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTransactionParametersDecodeErrorZ_err"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
        *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11872,11 +11987,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDeco
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -11927,11 +12041,10 @@ uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecod
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12015,11 +12128,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentTransactionDecodeErrorZ_err"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
        *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12163,11 +12275,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownScriptDecodeErrorZ_err"))) TS_CResult_ShutdownScriptDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownScriptDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownScriptDecodeErrorZ), "LDKCResult_ShutdownScriptDecodeErrorZ");
        *ret_conv = CResult_ShutdownScriptDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12273,11 +12384,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHopDecodeErrorZ_err"))) TS_CResult_RouteHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHopDecodeErrorZ), "LDKCResult_RouteHopDecodeErrorZ");
        *ret_conv = CResult_RouteHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12380,11 +12490,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_ok"))) TS_CRe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteDecodeErrorZ_err"))) TS_CResult_RouteDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
        *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12435,11 +12544,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteParametersDecodeErrorZ_err"))) TS_CResult_RouteParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteParametersDecodeErrorZ), "LDKCResult_RouteParametersDecodeErrorZ");
        *ret_conv = CResult_RouteParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12569,11 +12677,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PaymentParametersDecodeErrorZ_err"))) TS_CResult_PaymentParametersDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentParametersDecodeErrorZ), "LDKCResult_PaymentParametersDecodeErrorZ");
        *ret_conv = CResult_PaymentParametersDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12644,11 +12751,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintDecodeErrorZ_err"))) TS_CResult_RouteHintDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintDecodeErrorZ), "LDKCResult_RouteHintDecodeErrorZ");
        *ret_conv = CResult_RouteHintDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12699,11 +12805,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RouteHintHopDecodeErrorZ_err"))) TS_CResult_RouteHintHopDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RouteHintHopDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteHintHopDecodeErrorZ), "LDKCResult_RouteHintHopDecodeErrorZ");
        *ret_conv = CResult_RouteHintHopDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12828,11 +12933,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PaymentPurposeDecodeErrorZ_err"))) TS_CResult_PaymentPurposeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PaymentPurposeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentPurposeDecodeErrorZ), "LDKCResult_PaymentPurposeDecodeErrorZ");
        *ret_conv = CResult_PaymentPurposeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -12929,11 +13033,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_ClosureReasonZDecodeErrorZ_err"))) TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_ClosureReasonZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_ClosureReasonZDecodeErrorZ), "LDKCResult_COption_ClosureReasonZDecodeErrorZ");
        *ret_conv = CResult_COption_ClosureReasonZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13030,11 +13133,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeE
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err"))) TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_HTLCDestinationZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_HTLCDestinationZDecodeErrorZ), "LDKCResult_COption_HTLCDestinationZDecodeErrorZ");
        *ret_conv = CResult_COption_HTLCDestinationZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13198,11 +13300,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_EventZDecodeErrorZ_err"))) TS_CResult_COption_EventZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_EventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_EventZDecodeErrorZ), "LDKCResult_COption_EventZDecodeErrorZ");
        *ret_conv = CResult_COption_EventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13388,52 +13489,6 @@ void  __attribute__((export_name("TS_CVec_TxidZ_free"))) TS_CVec_TxidZ_free(ptrA
        CVec_TxidZ_free(_res_constr);
 }
 
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_ok() {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
-       return tag_ptr(ret_conv, true);
-}
-
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_err"))) TS_CResult_NoneChannelMonitorUpdateErrZ_err(uint32_t e) {
-       LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_js(e);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-jboolean  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok"))) TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(uint64_t o) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* o_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneChannelMonitorUpdateErrZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-void  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_free"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-int64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(uint64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* arg_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-uint64_t  __attribute__((export_name("TS_CResult_NoneChannelMonitorUpdateErrZ_clone"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint64_t orig) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)untag_ptr(orig);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 void  __attribute__((export_name("TS_CVec_MonitorEventZ_free"))) TS_CVec_MonitorEventZ_free(uint64_tArray _res) {
        LDKCVec_MonitorEventZ _res_constr;
        _res_constr.datalen = _res->arr_len;
@@ -13543,11 +13598,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FixedPenaltyScorerDecodeErrorZ_err"))) TS_CResult_FixedPenaltyScorerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FixedPenaltyScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FixedPenaltyScorerDecodeErrorZ), "LDKCResult_FixedPenaltyScorerDecodeErrorZ");
        *ret_conv = CResult_FixedPenaltyScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13699,11 +13753,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ProbabilisticScorerDecodeErrorZ_err"))) TS_CResult_ProbabilisticScorerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ProbabilisticScorerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ProbabilisticScorerDecodeErrorZ), "LDKCResult_ProbabilisticScorerDecodeErrorZ");
        *ret_conv = CResult_ProbabilisticScorerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13736,11 +13789,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InitFeaturesDecodeErrorZ_err"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
        *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13791,11 +13843,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13846,11 +13897,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeFeaturesDecodeErrorZ_err"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
        *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13901,11 +13951,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_ok"
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InvoiceFeaturesDecodeErrorZ_err"))) TS_CResult_InvoiceFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceFeaturesDecodeErrorZ), "LDKCResult_InvoiceFeaturesDecodeErrorZ");
        *ret_conv = CResult_InvoiceFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -13956,11 +14005,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err"))) TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
        *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14011,11 +14059,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_ok"))) TS_CR
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeIdDecodeErrorZ_err"))) TS_CResult_NodeIdDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
        *ret_conv = CResult_NodeIdDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14065,11 +14112,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err"))) TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_NetworkUpdateZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_NetworkUpdateZDecodeErrorZ), "LDKCResult_COption_NetworkUpdateZDecodeErrorZ");
        *ret_conv = CResult_COption_NetworkUpdateZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14345,11 +14391,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateInfoDecodeErrorZ_err"))) TS_CResult_ChannelUpdateInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateInfoDecodeErrorZ), "LDKCResult_ChannelUpdateInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14400,11 +14445,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelInfoDecodeErrorZ_err"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
        *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14455,11 +14499,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RoutingFeesDecodeErrorZ_err"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
        *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14530,11 +14573,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14585,11 +14627,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAliasDecodeErrorZ_err"))) TS_CResult_NodeAliasDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAliasDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAliasDecodeErrorZ), "LDKCResult_NodeAliasDecodeErrorZ");
        *ret_conv = CResult_NodeAliasDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14640,11 +14681,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeInfoDecodeErrorZ_err"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
        *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14696,11 +14736,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NetworkGraphDecodeErrorZ_err"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
        *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14792,11 +14831,10 @@ uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorD
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14847,11 +14885,10 @@ uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDe
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err"))) TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ), "LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -14901,11 +14938,10 @@ uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecode
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SpendableOutputDescriptorDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ), "LDKCResult_SpendableOutputDescriptorDecodeErrorZ");
        *ret_conv = CResult_SpendableOutputDescriptorDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15247,6 +15283,54 @@ uint64_t  __attribute__((export_name("TS_CResult_SecretKeyNoneZ_clone"))) TS_CRe
        return tag_ptr(ret_conv, true);
 }
 
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_ok"))) TS_CResult_PublicKeyNoneZ_ok(int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK(o->arr_len == 33);
+       memcpy(o_ref.compressed_form, o->elems, 33); FREE(o);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_err"))) TS_CResult_PublicKeyNoneZ_err() {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_is_ok"))) TS_CResult_PublicKeyNoneZ_is_ok(uint64_t o) {
+       LDKCResult_PublicKeyNoneZ* o_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeyNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_free"))) TS_CResult_PublicKeyNoneZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeyNoneZ _res_conv = *(LDKCResult_PublicKeyNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeyNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+int64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone_ptr"))) TS_CResult_PublicKeyNoneZ_clone_ptr(uint64_t arg) {
+       LDKCResult_PublicKeyNoneZ* arg_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeyNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_PublicKeyNoneZ_clone"))) TS_CResult_PublicKeyNoneZ_clone(uint64_t orig) {
+       LDKCResult_PublicKeyNoneZ* orig_conv = (LDKCResult_PublicKeyNoneZ*)untag_ptr(orig);
+       LDKCResult_PublicKeyNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyNoneZ), "LDKCResult_PublicKeyNoneZ");
+       *ret_conv = CResult_PublicKeyNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_COption_ScalarZ_some"))) TS_COption_ScalarZ_some(uint64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -15336,11 +15420,10 @@ uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_SignDecodeErrorZ_err"))) TS_CResult_SignDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
        *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -15545,11 +15628,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InMemorySignerDecodeErrorZ_err"))) TS_CResult_InMemorySignerDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
        *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16359,11 +16441,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecod
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err"))) TS_CResult_CounterpartyForwardingInfoDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CounterpartyForwardingInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyForwardingInfoDecodeErrorZ), "LDKCResult_CounterpartyForwardingInfoDecodeErrorZ");
        *ret_conv = CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16414,11 +16495,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelCounterpartyDecodeErrorZ_err"))) TS_CResult_ChannelCounterpartyDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelCounterpartyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelCounterpartyDecodeErrorZ), "LDKCResult_ChannelCounterpartyDecodeErrorZ");
        *ret_conv = CResult_ChannelCounterpartyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16469,11 +16549,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelDetailsDecodeErrorZ_err"))) TS_CResult_ChannelDetailsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelDetailsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelDetailsDecodeErrorZ), "LDKCResult_ChannelDetailsDecodeErrorZ");
        *ret_conv = CResult_ChannelDetailsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16524,11 +16603,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PhantomRouteHintsDecodeErrorZ_err"))) TS_CResult_PhantomRouteHintsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PhantomRouteHintsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PhantomRouteHintsDecodeErrorZ), "LDKCResult_PhantomRouteHintsDecodeErrorZ");
        *ret_conv = CResult_PhantomRouteHintsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16622,11 +16700,10 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManager
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16659,11 +16736,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelConfigDecodeErrorZ_err"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
        *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16714,11 +16790,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OutPointDecodeErrorZ_err"))) TS_CResult_OutPointDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
        *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16818,11 +16893,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_TypeZDecodeErrorZ_err"))) TS_CResult_COption_TypeZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_TypeZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_TypeZDecodeErrorZ), "LDKCResult_COption_TypeZDecodeErrorZ");
        *ret_conv = CResult_COption_TypeZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -16926,11 +17000,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InFlightHtlcsDecodeErrorZ_err"))) TS_CResult_InFlightHtlcsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InFlightHtlcsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InFlightHtlcsDecodeErrorZ), "LDKCResult_InFlightHtlcsDecodeErrorZ");
        *ret_conv = CResult_InFlightHtlcsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17535,11 +17608,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17636,11 +17708,10 @@ uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_COption_MonitorEventZDecodeErrorZ_err"))) TS_CResult_COption_MonitorEventZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_COption_MonitorEventZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_MonitorEventZDecodeErrorZ), "LDKCResult_COption_MonitorEventZDecodeErrorZ");
        *ret_conv = CResult_COption_MonitorEventZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -17691,11 +17762,10 @@ uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_HTLCUpdateDecodeErrorZ_err"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
        *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18147,11 +18217,10 @@ uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitor
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
        *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18253,6 +18322,109 @@ void  __attribute__((export_name("TS_CVec_C2Tuple_PublicKeyTypeZZ_free"))) TS_CV
        CVec_C2Tuple_PublicKeyTypeZZ_free(_res_constr);
 }
 
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_some"))) TS_COption_CustomOnionMessageContentsZ_some(uint64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCustomOnionMessageContents o_conv = *(LDKCustomOnionMessageContents*)(o_ptr);
+       if (o_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_some(o_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_none"))) TS_COption_CustomOnionMessageContentsZ_none() {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_none();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+void  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_free"))) TS_COption_CustomOnionMessageContentsZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_CustomOnionMessageContentsZ _res_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_CustomOnionMessageContentsZ_free(_res_conv);
+}
+
+static inline uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg) {
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+int64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone_ptr"))) TS_COption_CustomOnionMessageContentsZ_clone_ptr(uint64_t arg) {
+       LDKCOption_CustomOnionMessageContentsZ* arg_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_CustomOnionMessageContentsZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_COption_CustomOnionMessageContentsZ_clone"))) TS_COption_CustomOnionMessageContentsZ_clone(uint64_t orig) {
+       LDKCOption_CustomOnionMessageContentsZ* orig_conv = (LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(orig);
+       LDKCOption_CustomOnionMessageContentsZ *ret_copy = MALLOC(sizeof(LDKCOption_CustomOnionMessageContentsZ), "LDKCOption_CustomOnionMessageContentsZ");
+       *ret_copy = COption_CustomOnionMessageContentsZ_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(uint64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKCOption_CustomOnionMessageContentsZ o_conv = *(LDKCOption_CustomOnionMessageContentsZ*)(o_ptr);
+       o_conv = COption_CustomOnionMessageContentsZ_clone((LDKCOption_CustomOnionMessageContentsZ*)untag_ptr(o));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(uint64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(uint64_t o) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* o_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res_conv = *(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+int64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(uint64_t arg) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* arg_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone"))) TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(uint64_t orig) {
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* orig_conv = (LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ), "LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ");
+       *ret_conv = CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 uint64_t  __attribute__((export_name("TS_COption_NetAddressZ_some"))) TS_COption_NetAddressZ_some(uint64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -18485,6 +18657,37 @@ void  __attribute__((export_name("TS_CResult_NoneSendErrorZ_free"))) TS_CResult_
        CResult_NoneSendErrorZ_free(_res_conv);
 }
 
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_ok"))) TS_CResult_u32GraphSyncErrorZ_ok(int32_t o) {
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = CResult_u32GraphSyncErrorZ_ok(o);
+       return tag_ptr(ret_conv, true);
+}
+
+uint64_t  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_err"))) TS_CResult_u32GraphSyncErrorZ_err(uint64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKGraphSyncError e_conv = *(LDKGraphSyncError*)(e_ptr);
+       e_conv = GraphSyncError_clone((LDKGraphSyncError*)untag_ptr(e));
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = CResult_u32GraphSyncErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_is_ok"))) TS_CResult_u32GraphSyncErrorZ_is_ok(uint64_t o) {
+       LDKCResult_u32GraphSyncErrorZ* o_conv = (LDKCResult_u32GraphSyncErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_u32GraphSyncErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CResult_u32GraphSyncErrorZ_free"))) TS_CResult_u32GraphSyncErrorZ_free(uint64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_u32GraphSyncErrorZ _res_conv = *(LDKCResult_u32GraphSyncErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_u32GraphSyncErrorZ_free(_res_conv);
+}
+
 uint64_t  __attribute__((export_name("TS_CResult_NoneErrorZ_ok"))) TS_CResult_NoneErrorZ_ok() {
        LDKCResult_NoneErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneErrorZ), "LDKCResult_NoneErrorZ");
        *ret_conv = CResult_NoneErrorZ_ok();
@@ -18542,11 +18745,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_ok"))) T
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NetAddressDecodeErrorZ_err"))) TS_CResult_NetAddressDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NetAddressDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetAddressDecodeErrorZ), "LDKCResult_NetAddressDecodeErrorZ");
        *ret_conv = CResult_NetAddressDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18677,11 +18879,10 @@ uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_AcceptChannelDecodeErrorZ_err"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
        *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18732,11 +18933,10 @@ uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_AnnouncementSignaturesDecodeErrorZ_err"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
        *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18787,11 +18987,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReestablishDecodeErrorZ_err"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
        *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18842,11 +19041,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedDecodeErrorZ_err"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18897,11 +19095,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err"))) TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ClosingSignedFeeRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ), "LDKCResult_ClosingSignedFeeRangeDecodeErrorZ");
        *ret_conv = CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -18952,11 +19149,10 @@ uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_ok
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_CommitmentSignedDecodeErrorZ_err"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
        *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19007,11 +19203,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FundingCreatedDecodeErrorZ_err"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
        *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19062,11 +19257,10 @@ uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_FundingSignedDecodeErrorZ_err"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
        *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19117,11 +19311,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelReadyDecodeErrorZ_err"))) TS_CResult_ChannelReadyDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelReadyDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReadyDecodeErrorZ), "LDKCResult_ChannelReadyDecodeErrorZ");
        *ret_conv = CResult_ChannelReadyDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19172,11 +19365,10 @@ uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_InitDecodeErrorZ_err"))) TS_CResult_InitDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
        *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19227,11 +19419,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OpenChannelDecodeErrorZ_err"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
        *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19282,11 +19473,10 @@ uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_RevokeAndACKDecodeErrorZ_err"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
        *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19337,11 +19527,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_ok"))) TS_
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ShutdownDecodeErrorZ_err"))) TS_CResult_ShutdownDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
        *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19392,11 +19581,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19447,11 +19635,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeEr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19502,11 +19689,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_ok"))) TS
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFeeDecodeErrorZ_err"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
        *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19557,11 +19743,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19612,11 +19797,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UpdateAddHTLCDecodeErrorZ_err"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
        *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19667,11 +19851,10 @@ uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_OnionMessageDecodeErrorZ_err"))) TS_CResult_OnionMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_OnionMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessageDecodeErrorZ), "LDKCResult_OnionMessageDecodeErrorZ");
        *ret_conv = CResult_OnionMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19722,11 +19905,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PingDecodeErrorZ_err"))) TS_CResult_PingDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
        *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19777,11 +19959,10 @@ uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_ok"))) TS_CRes
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_PongDecodeErrorZ_err"))) TS_CResult_PongDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
        *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19832,11 +20013,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDeco
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19887,11 +20067,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelAnnouncementDecodeErrorZ_err"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
        *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19942,11 +20121,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -19997,11 +20175,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_ok"))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ChannelUpdateDecodeErrorZ_err"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
        *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20052,11 +20229,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_ok")))
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ErrorMessageDecodeErrorZ_err"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
        *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20107,11 +20283,10 @@ uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_ok")
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_WarningMessageDecodeErrorZ_err"))) TS_CResult_WarningMessageDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_WarningMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_WarningMessageDecodeErrorZ), "LDKCResult_WarningMessageDecodeErrorZ");
        *ret_conv = CResult_WarningMessageDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20162,11 +20337,10 @@ uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeE
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20217,11 +20391,10 @@ uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_ok
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_NodeAnnouncementDecodeErrorZ_err"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
        *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20272,11 +20445,10 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeError
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_QueryShortChannelIdsDecodeErrorZ_err"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
        *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20327,11 +20499,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeEr
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
        *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20382,11 +20553,10 @@ uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_QueryChannelRangeDecodeErrorZ_err"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
        *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20437,11 +20607,10 @@ uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_o
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_ReplyChannelRangeDecodeErrorZ_err"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
        *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20492,11 +20661,10 @@ uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErro
 }
 
 uint64_t  __attribute__((export_name("TS_CResult_GossipTimestampFilterDecodeErrorZ_err"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = untag_ptr(e);
-       e_conv.is_owned = ptr_is_owned(e);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       e_conv = DecodeError_clone(&e_conv);
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
        LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
        *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -20830,6 +20998,13 @@ uint64_t  __attribute__((export_name("TS_ClosureReason_outdated_channel_manager"
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosureReason_eq"))) TS_ClosureReason_eq(uint64_t a, uint64_t b) {
+       LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
+       LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
+       jboolean ret_conv = ClosureReason_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ClosureReason_write"))) TS_ClosureReason_write(uint64_t obj) {
        LDKClosureReason* obj_conv = (LDKClosureReason*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = ClosureReason_write(obj_conv);
@@ -20908,6 +21083,13 @@ uint64_t  __attribute__((export_name("TS_HTLCDestination_failed_payment"))) TS_H
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCDestination_eq"))) TS_HTLCDestination_eq(uint64_t a, uint64_t b) {
+       LDKHTLCDestination* a_conv = (LDKHTLCDestination*)untag_ptr(a);
+       LDKHTLCDestination* b_conv = (LDKHTLCDestination*)untag_ptr(b);
+       jboolean ret_conv = HTLCDestination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCDestination_write"))) TS_HTLCDestination_write(uint64_t obj) {
        LDKHTLCDestination* obj_conv = (LDKHTLCDestination*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = HTLCDestination_write(obj_conv);
@@ -21727,9 +21909,9 @@ uint64_t  __attribute__((export_name("TS_APIError_channel_unavailable"))) TS_API
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_APIError_monitor_update_failed"))) TS_APIError_monitor_update_failed() {
+uint64_t  __attribute__((export_name("TS_APIError_monitor_update_in_progress"))) TS_APIError_monitor_update_in_progress() {
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = APIError_monitor_update_failed();
+       *ret_copy = APIError_monitor_update_in_progress();
        uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -21746,6 +21928,13 @@ uint64_t  __attribute__((export_name("TS_APIError_incompatible_shutdown_script")
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_APIError_eq"))) TS_APIError_eq(uint64_t a, uint64_t b) {
+       LDKAPIError* a_conv = (LDKAPIError*)untag_ptr(a);
+       LDKAPIError* b_conv = (LDKAPIError*)untag_ptr(b);
+       jboolean ret_conv = APIError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_BigSize_free"))) TS_BigSize_free(uint64_t this_obj) {
        LDKBigSize this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -21819,6 +22008,21 @@ uint64_t  __attribute__((export_name("TS_Hostname_clone"))) TS_Hostname_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Hostname_eq"))) TS_Hostname_eq(uint64_t a, uint64_t b) {
+       LDKHostname a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHostname b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Hostname_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_t  __attribute__((export_name("TS_Hostname_len"))) TS_Hostname_len(uint64_t this_arg) {
        LDKHostname this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -22731,6 +22935,21 @@ uint64_t  __attribute__((export_name("TS_ChannelConfig_clone"))) TS_ChannelConfi
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelConfig_eq"))) TS_ChannelConfig_eq(uint64_t a, uint64_t b) {
+       LDKChannelConfig a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelConfig b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelConfig_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ChannelConfig_default"))) TS_ChannelConfig_default() {
        LDKChannelConfig ret_var = ChannelConfig_default();
        uint64_t ret_ref = 0;
@@ -23007,6 +23226,21 @@ uint64_t  __attribute__((export_name("TS_BestBlock_clone"))) TS_BestBlock_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_BestBlock_eq"))) TS_BestBlock_eq(uint64_t a, uint64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBestBlock b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = BestBlock_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_BestBlock_from_genesis"))) TS_BestBlock_from_genesis(uint32_t network) {
        LDKNetwork network_conv = LDKNetwork_from_js(network);
        LDKBestBlock ret_var = BestBlock_from_genesis(network_conv);
@@ -23091,19 +23325,31 @@ void  __attribute__((export_name("TS_Confirm_free"))) TS_Confirm_free(uint64_t t
        Confirm_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_clone"))) TS_ChannelMonitorUpdateErr_clone(uint64_t orig) {
-       LDKChannelMonitorUpdateErr* orig_conv = (LDKChannelMonitorUpdateErr*)untag_ptr(orig);
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_clone(orig_conv));
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_clone"))) TS_ChannelMonitorUpdateStatus_clone(uint64_t orig) {
+       LDKChannelMonitorUpdateStatus* orig_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(orig);
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_clone(orig_conv));
+       return ret_conv;
+}
+
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_completed"))) TS_ChannelMonitorUpdateStatus_completed() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_completed());
        return ret_conv;
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_in_progress"))) TS_ChannelMonitorUpdateStatus_in_progress() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_in_progress());
        return ret_conv;
 }
 
-uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateErr_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_failure());
+uint32_t  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_permanent_failure"))) TS_ChannelMonitorUpdateStatus_permanent_failure() {
+       uint32_t ret_conv = LDKChannelMonitorUpdateStatus_to_js(ChannelMonitorUpdateStatus_permanent_failure());
+       return ret_conv;
+}
+
+jboolean  __attribute__((export_name("TS_ChannelMonitorUpdateStatus_eq"))) TS_ChannelMonitorUpdateStatus_eq(uint64_t a, uint64_t b) {
+       LDKChannelMonitorUpdateStatus* a_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(a);
+       LDKChannelMonitorUpdateStatus* b_conv = (LDKChannelMonitorUpdateStatus*)untag_ptr(b);
+       jboolean ret_conv = ChannelMonitorUpdateStatus_eq(a_conv, b_conv);
        return ret_conv;
 }
 
@@ -23258,6 +23504,21 @@ uint64_t  __attribute__((export_name("TS_WatchedOutput_clone"))) TS_WatchedOutpu
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_WatchedOutput_eq"))) TS_WatchedOutput_eq(uint64_t a, uint64_t b) {
+       LDKWatchedOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWatchedOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WatchedOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int64_t  __attribute__((export_name("TS_WatchedOutput_hash"))) TS_WatchedOutput_hash(uint64_t o) {
        LDKWatchedOutput o_conv;
        o_conv.inner = untag_ptr(o);
@@ -23723,14 +23984,14 @@ uint64_t  __attribute__((export_name("TS_MonitorEvent_commitment_tx_confirmed"))
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_MonitorEvent_update_completed"))) TS_MonitorEvent_update_completed(uint64_t funding_txo, int64_t monitor_update_id) {
+uint64_t  __attribute__((export_name("TS_MonitorEvent_completed"))) TS_MonitorEvent_completed(uint64_t funding_txo, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_update_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
        uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -23747,6 +24008,13 @@ uint64_t  __attribute__((export_name("TS_MonitorEvent_update_failed"))) TS_Monit
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_MonitorEvent_eq"))) TS_MonitorEvent_eq(uint64_t a, uint64_t b) {
+       LDKMonitorEvent* a_conv = (LDKMonitorEvent*)untag_ptr(a);
+       LDKMonitorEvent* b_conv = (LDKMonitorEvent*)untag_ptr(b);
+       jboolean ret_conv = MonitorEvent_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_MonitorEvent_write"))) TS_MonitorEvent_write(uint64_t obj) {
        LDKMonitorEvent* obj_conv = (LDKMonitorEvent*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = MonitorEvent_write(obj_conv);
@@ -23804,6 +24072,21 @@ uint64_t  __attribute__((export_name("TS_HTLCUpdate_clone"))) TS_HTLCUpdate_clon
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCUpdate_eq"))) TS_HTLCUpdate_eq(uint64_t a, uint64_t b) {
+       LDKHTLCUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCUpdate_write"))) TS_HTLCUpdate_write(uint64_t obj) {
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -24790,6 +25073,21 @@ uint64_t  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_clone"))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_eq"))) TS_DelayedPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKDelayedPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DelayedPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_DelayedPaymentOutputDescriptor_write"))) TS_DelayedPaymentOutputDescriptor_write(uint64_t obj) {
        LDKDelayedPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -24964,6 +25262,21 @@ uint64_t  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_clone")))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_eq"))) TS_StaticPaymentOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKStaticPaymentOutputDescriptor a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = StaticPaymentOutputDescriptor_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_StaticPaymentOutputDescriptor_write"))) TS_StaticPaymentOutputDescriptor_write(uint64_t obj) {
        LDKStaticPaymentOutputDescriptor obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -25056,6 +25369,13 @@ uint64_t  __attribute__((export_name("TS_SpendableOutputDescriptor_static_paymen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_SpendableOutputDescriptor_eq"))) TS_SpendableOutputDescriptor_eq(uint64_t a, uint64_t b) {
+       LDKSpendableOutputDescriptor* a_conv = (LDKSpendableOutputDescriptor*)untag_ptr(a);
+       LDKSpendableOutputDescriptor* b_conv = (LDKSpendableOutputDescriptor*)untag_ptr(b);
+       jboolean ret_conv = SpendableOutputDescriptor_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_SpendableOutputDescriptor_write"))) TS_SpendableOutputDescriptor_write(uint64_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
@@ -27713,6 +28033,30 @@ uint64_t  __attribute__((export_name("TS_ChannelManager_as_ChannelMessageHandler
        return tag_ptr(ret_ret, true);
 }
 
+uint64_t  __attribute__((export_name("TS_provided_node_features"))) TS_provided_node_features() {
+       LDKNodeFeatures ret_var = provided_node_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_provided_channel_features"))) TS_provided_channel_features() {
+       LDKChannelFeatures ret_var = provided_channel_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_provided_init_features"))) TS_provided_init_features() {
+       LDKInitFeatures ret_var = provided_init_features();
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((export_name("TS_CounterpartyForwardingInfo_write"))) TS_CounterpartyForwardingInfo_write(uint64_t obj) {
        LDKCounterpartyForwardingInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -28125,44 +28469,92 @@ uint64_t  __attribute__((export_name("TS_create_from_hash"))) TS_create_from_has
        return tag_ptr(ret_conv, true);
 }
 
-void  __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_obj) {
-       LDKDecodeError this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       DecodeError_free(this_obj_conv);
+void  __attribute__((export_name("TS_DecodeError_free"))) TS_DecodeError_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKDecodeError this_ptr_conv = *(LDKDecodeError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       DecodeError_free(this_ptr_conv);
 }
 
 static inline uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg) {
-       LDKDecodeError ret_var = DecodeError_clone(arg);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 int64_t  __attribute__((export_name("TS_DecodeError_clone_ptr"))) TS_DecodeError_clone_ptr(uint64_t arg) {
-       LDKDecodeError arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = DecodeError_clone_ptr(&arg_conv);
+       LDKDecodeError* arg_conv = (LDKDecodeError*)untag_ptr(arg);
+       int64_t ret_conv = DecodeError_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 uint64_t  __attribute__((export_name("TS_DecodeError_clone"))) TS_DecodeError_clone(uint64_t orig) {
-       LDKDecodeError orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKDecodeError ret_var = DecodeError_clone(&orig_conv);
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKDecodeError* orig_conv = (LDKDecodeError*)untag_ptr(orig);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_unknown_version"))) TS_DecodeError_unknown_version() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_version();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_unknown_required_feature"))) TS_DecodeError_unknown_required_feature() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unknown_required_feature();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_invalid_value"))) TS_DecodeError_invalid_value() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_invalid_value();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_short_read"))) TS_DecodeError_short_read() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_short_read();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_bad_length_descriptor"))) TS_DecodeError_bad_length_descriptor() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_bad_length_descriptor();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_DecodeError_io"))) TS_DecodeError_io(uint32_t a) {
+       LDKIOError a_conv = LDKIOError_from_js(a);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_io(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
+uint64_t  __attribute__((export_name("TS_DecodeError_unsupported_compression"))) TS_DecodeError_unsupported_compression() {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_unsupported_compression();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+jboolean  __attribute__((export_name("TS_DecodeError_eq"))) TS_DecodeError_eq(uint64_t a, uint64_t b) {
+       LDKDecodeError* a_conv = (LDKDecodeError*)untag_ptr(a);
+       LDKDecodeError* b_conv = (LDKDecodeError*)untag_ptr(b);
+       jboolean ret_conv = DecodeError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Init_free"))) TS_Init_free(uint64_t this_obj) {
        LDKInit this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28269,6 +28661,21 @@ uint64_t  __attribute__((export_name("TS_Init_clone"))) TS_Init_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Init_eq"))) TS_Init_eq(uint64_t a, uint64_t b) {
+       LDKInit a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInit b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Init_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ErrorMessage_free"))) TS_ErrorMessage_free(uint64_t this_obj) {
        LDKErrorMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28364,6 +28771,21 @@ uint64_t  __attribute__((export_name("TS_ErrorMessage_clone"))) TS_ErrorMessage_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ErrorMessage_eq"))) TS_ErrorMessage_eq(uint64_t a, uint64_t b) {
+       LDKErrorMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKErrorMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ErrorMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_WarningMessage_free"))) TS_WarningMessage_free(uint64_t this_obj) {
        LDKWarningMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28459,6 +28881,21 @@ uint64_t  __attribute__((export_name("TS_WarningMessage_clone"))) TS_WarningMess
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_WarningMessage_eq"))) TS_WarningMessage_eq(uint64_t a, uint64_t b) {
+       LDKWarningMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKWarningMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = WarningMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Ping_free"))) TS_Ping_free(uint64_t this_obj) {
        LDKPing this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28543,6 +28980,21 @@ uint64_t  __attribute__((export_name("TS_Ping_clone"))) TS_Ping_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Ping_eq"))) TS_Ping_eq(uint64_t a, uint64_t b) {
+       LDKPing a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPing b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Ping_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Pong_free"))) TS_Pong_free(uint64_t this_obj) {
        LDKPong this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -28608,6 +29060,21 @@ uint64_t  __attribute__((export_name("TS_Pong_clone"))) TS_Pong_clone(uint64_t o
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Pong_eq"))) TS_Pong_eq(uint64_t a, uint64_t b) {
+       LDKPong a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKPong b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Pong_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_OpenChannel_free"))) TS_OpenChannel_free(uint64_t this_obj) {
        LDKOpenChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29047,6 +29514,21 @@ uint64_t  __attribute__((export_name("TS_OpenChannel_clone"))) TS_OpenChannel_cl
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_OpenChannel_eq"))) TS_OpenChannel_eq(uint64_t a, uint64_t b) {
+       LDKOpenChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOpenChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OpenChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_AcceptChannel_free"))) TS_AcceptChannel_free(uint64_t this_obj) {
        LDKAcceptChannel this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29406,6 +29888,21 @@ uint64_t  __attribute__((export_name("TS_AcceptChannel_clone"))) TS_AcceptChanne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_AcceptChannel_eq"))) TS_AcceptChannel_eq(uint64_t a, uint64_t b) {
+       LDKAcceptChannel a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAcceptChannel b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AcceptChannel_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_FundingCreated_free"))) TS_FundingCreated_free(uint64_t this_obj) {
        LDKFundingCreated this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29549,6 +30046,21 @@ uint64_t  __attribute__((export_name("TS_FundingCreated_clone"))) TS_FundingCrea
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_FundingCreated_eq"))) TS_FundingCreated_eq(uint64_t a, uint64_t b) {
+       LDKFundingCreated a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingCreated b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingCreated_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_FundingSigned_free"))) TS_FundingSigned_free(uint64_t this_obj) {
        LDKFundingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29647,6 +30159,21 @@ uint64_t  __attribute__((export_name("TS_FundingSigned_clone"))) TS_FundingSigne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_FundingSigned_eq"))) TS_FundingSigned_eq(uint64_t a, uint64_t b) {
+       LDKFundingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKFundingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = FundingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelReady_free"))) TS_ChannelReady_free(uint64_t this_obj) {
        LDKChannelReady this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29774,6 +30301,21 @@ uint64_t  __attribute__((export_name("TS_ChannelReady_clone"))) TS_ChannelReady_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelReady_eq"))) TS_ChannelReady_eq(uint64_t a, uint64_t b) {
+       LDKChannelReady a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReady b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReady_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Shutdown_free"))) TS_Shutdown_free(uint64_t this_obj) {
        LDKShutdown this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29875,6 +30417,21 @@ uint64_t  __attribute__((export_name("TS_Shutdown_clone"))) TS_Shutdown_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_Shutdown_eq"))) TS_Shutdown_eq(uint64_t a, uint64_t b) {
+       LDKShutdown a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdown b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Shutdown_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ClosingSignedFeeRange_free"))) TS_ClosingSignedFeeRange_free(uint64_t this_obj) {
        LDKClosingSignedFeeRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -29959,6 +30516,21 @@ uint64_t  __attribute__((export_name("TS_ClosingSignedFeeRange_clone"))) TS_Clos
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingSignedFeeRange_eq"))) TS_ClosingSignedFeeRange_eq(uint64_t a, uint64_t b) {
+       LDKClosingSignedFeeRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSignedFeeRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSignedFeeRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ClosingSigned_free"))) TS_ClosingSigned_free(uint64_t this_obj) {
        LDKClosingSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30108,6 +30680,21 @@ uint64_t  __attribute__((export_name("TS_ClosingSigned_clone"))) TS_ClosingSigne
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingSigned_eq"))) TS_ClosingSigned_eq(uint64_t a, uint64_t b) {
+       LDKClosingSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateAddHTLC_free"))) TS_UpdateAddHTLC_free(uint64_t this_obj) {
        LDKUpdateAddHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30249,6 +30836,21 @@ uint64_t  __attribute__((export_name("TS_UpdateAddHTLC_clone"))) TS_UpdateAddHTL
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateAddHTLC_eq"))) TS_UpdateAddHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateAddHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateAddHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateAddHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_OnionMessage_free"))) TS_OnionMessage_free(uint64_t this_obj) {
        LDKOnionMessage this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30310,6 +30912,21 @@ uint64_t  __attribute__((export_name("TS_OnionMessage_clone"))) TS_OnionMessage_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_OnionMessage_eq"))) TS_OnionMessage_eq(uint64_t a, uint64_t b) {
+       LDKOnionMessage a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOnionMessage b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OnionMessage_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFulfillHTLC_free"))) TS_UpdateFulfillHTLC_free(uint64_t this_obj) {
        LDKUpdateFulfillHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30427,6 +31044,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFulfillHTLC_clone"))) TS_UpdateFu
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFulfillHTLC_eq"))) TS_UpdateFulfillHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFulfillHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFulfillHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFulfillHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFailHTLC_free"))) TS_UpdateFailHTLC_free(uint64_t this_obj) {
        LDKUpdateFailHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30507,6 +31139,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFailHTLC_clone"))) TS_UpdateFailH
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFailHTLC_eq"))) TS_UpdateFailHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFailHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFailMalformedHTLC_free"))) TS_UpdateFailMalformedHTLC_free(uint64_t this_obj) {
        LDKUpdateFailMalformedHTLC this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30606,6 +31253,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFailMalformedHTLC_clone"))) TS_Up
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFailMalformedHTLC_eq"))) TS_UpdateFailMalformedHTLC_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFailMalformedHTLC a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFailMalformedHTLC b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFailMalformedHTLC_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_CommitmentSigned_free"))) TS_CommitmentSigned_free(uint64_t this_obj) {
        LDKCommitmentSigned this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30763,6 +31425,21 @@ uint64_t  __attribute__((export_name("TS_CommitmentSigned_clone"))) TS_Commitmen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_CommitmentSigned_eq"))) TS_CommitmentSigned_eq(uint64_t a, uint64_t b) {
+       LDKCommitmentSigned a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentSigned b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentSigned_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_RevokeAndACK_free"))) TS_RevokeAndACK_free(uint64_t this_obj) {
        LDKRevokeAndACK this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30887,6 +31564,21 @@ uint64_t  __attribute__((export_name("TS_RevokeAndACK_clone"))) TS_RevokeAndACK_
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_RevokeAndACK_eq"))) TS_RevokeAndACK_eq(uint64_t a, uint64_t b) {
+       LDKRevokeAndACK a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKRevokeAndACK b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = RevokeAndACK_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UpdateFee_free"))) TS_UpdateFee_free(uint64_t this_obj) {
        LDKUpdateFee this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -30978,6 +31670,21 @@ uint64_t  __attribute__((export_name("TS_UpdateFee_clone"))) TS_UpdateFee_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UpdateFee_eq"))) TS_UpdateFee_eq(uint64_t a, uint64_t b) {
+       LDKUpdateFee a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUpdateFee b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UpdateFee_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_DataLossProtect_free"))) TS_DataLossProtect_free(uint64_t this_obj) {
        LDKDataLossProtect this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31076,6 +31783,21 @@ uint64_t  __attribute__((export_name("TS_DataLossProtect_clone"))) TS_DataLossPr
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_DataLossProtect_eq"))) TS_DataLossProtect_eq(uint64_t a, uint64_t b) {
+       LDKDataLossProtect a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKDataLossProtect b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = DataLossProtect_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelReestablish_free"))) TS_ChannelReestablish_free(uint64_t this_obj) {
        LDKChannelReestablish this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31175,6 +31897,21 @@ uint64_t  __attribute__((export_name("TS_ChannelReestablish_clone"))) TS_Channel
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelReestablish_eq"))) TS_ChannelReestablish_eq(uint64_t a, uint64_t b) {
+       LDKChannelReestablish a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelReestablish b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelReestablish_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_AnnouncementSignatures_free"))) TS_AnnouncementSignatures_free(uint64_t this_obj) {
        LDKAnnouncementSignatures this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31318,6 +32055,21 @@ uint64_t  __attribute__((export_name("TS_AnnouncementSignatures_clone"))) TS_Ann
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_AnnouncementSignatures_eq"))) TS_AnnouncementSignatures_eq(uint64_t a, uint64_t b) {
+       LDKAnnouncementSignatures a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKAnnouncementSignatures b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = AnnouncementSignatures_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_NetAddress_free"))) TS_NetAddress_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -31399,6 +32151,13 @@ uint64_t  __attribute__((export_name("TS_NetAddress_hostname"))) TS_NetAddress_h
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NetAddress_eq"))) TS_NetAddress_eq(uint64_t a, uint64_t b) {
+       LDKNetAddress* a_conv = (LDKNetAddress*)untag_ptr(a);
+       LDKNetAddress* b_conv = (LDKNetAddress*)untag_ptr(b);
+       jboolean ret_conv = NetAddress_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NetAddress_write"))) TS_NetAddress_write(uint64_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
@@ -31617,6 +32376,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedNodeAnnouncement_clone"))) TS_U
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedNodeAnnouncement_eq"))) TS_UnsignedNodeAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedNodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_NodeAnnouncement_free"))) TS_NodeAnnouncement_free(uint64_t this_obj) {
        LDKNodeAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31721,6 +32495,21 @@ uint64_t  __attribute__((export_name("TS_NodeAnnouncement_clone"))) TS_NodeAnnou
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAnnouncement_eq"))) TS_NodeAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKNodeAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UnsignedChannelAnnouncement_free"))) TS_UnsignedChannelAnnouncement_free(uint64_t this_obj) {
        LDKUnsignedChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -31920,6 +32709,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedChannelAnnouncement_clone"))) T
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedChannelAnnouncement_eq"))) TS_UnsignedChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelAnnouncement_free"))) TS_ChannelAnnouncement_free(uint64_t this_obj) {
        LDKChannelAnnouncement this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32102,6 +32906,21 @@ uint64_t  __attribute__((export_name("TS_ChannelAnnouncement_clone"))) TS_Channe
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelAnnouncement_eq"))) TS_ChannelAnnouncement_eq(uint64_t a, uint64_t b) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelAnnouncement b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelAnnouncement_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_UnsignedChannelUpdate_free"))) TS_UnsignedChannelUpdate_free(uint64_t this_obj) {
        LDKUnsignedChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32356,6 +33175,21 @@ uint64_t  __attribute__((export_name("TS_UnsignedChannelUpdate_clone"))) TS_Unsi
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_UnsignedChannelUpdate_eq"))) TS_UnsignedChannelUpdate_eq(uint64_t a, uint64_t b) {
+       LDKUnsignedChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnsignedChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnsignedChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelUpdate_free"))) TS_ChannelUpdate_free(uint64_t this_obj) {
        LDKChannelUpdate this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32460,6 +33294,21 @@ uint64_t  __attribute__((export_name("TS_ChannelUpdate_clone"))) TS_ChannelUpdat
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelUpdate_eq"))) TS_ChannelUpdate_eq(uint64_t a, uint64_t b) {
+       LDKChannelUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_QueryChannelRange_free"))) TS_QueryChannelRange_free(uint64_t this_obj) {
        LDKQueryChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32570,6 +33419,21 @@ uint64_t  __attribute__((export_name("TS_QueryChannelRange_clone"))) TS_QueryCha
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_QueryChannelRange_eq"))) TS_QueryChannelRange_eq(uint64_t a, uint64_t b) {
+       LDKQueryChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ReplyChannelRange_free"))) TS_ReplyChannelRange_free(uint64_t this_obj) {
        LDKReplyChannelRange this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32751,6 +33615,21 @@ uint64_t  __attribute__((export_name("TS_ReplyChannelRange_clone"))) TS_ReplyCha
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ReplyChannelRange_eq"))) TS_ReplyChannelRange_eq(uint64_t a, uint64_t b) {
+       LDKReplyChannelRange a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyChannelRange b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyChannelRange_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_QueryShortChannelIds_free"))) TS_QueryShortChannelIds_free(uint64_t this_obj) {
        LDKQueryShortChannelIds this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32875,6 +33754,21 @@ uint64_t  __attribute__((export_name("TS_QueryShortChannelIds_clone"))) TS_Query
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_QueryShortChannelIds_eq"))) TS_QueryShortChannelIds_eq(uint64_t a, uint64_t b) {
+       LDKQueryShortChannelIds a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKQueryShortChannelIds b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = QueryShortChannelIds_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_free"))) TS_ReplyShortChannelIdsEnd_free(uint64_t this_obj) {
        LDKReplyShortChannelIdsEnd this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -32966,6 +33860,21 @@ uint64_t  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_clone"))) TS_Re
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ReplyShortChannelIdsEnd_eq"))) TS_ReplyShortChannelIdsEnd_eq(uint64_t a, uint64_t b) {
+       LDKReplyShortChannelIdsEnd a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKReplyShortChannelIdsEnd b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ReplyShortChannelIdsEnd_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_GossipTimestampFilter_free"))) TS_GossipTimestampFilter_free(uint64_t this_obj) {
        LDKGossipTimestampFilter this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -33076,6 +33985,21 @@ uint64_t  __attribute__((export_name("TS_GossipTimestampFilter_clone"))) TS_Goss
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_GossipTimestampFilter_eq"))) TS_GossipTimestampFilter_eq(uint64_t a, uint64_t b) {
+       LDKGossipTimestampFilter a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKGossipTimestampFilter b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = GossipTimestampFilter_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ErrorAction_free"))) TS_ErrorAction_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -33632,6 +34556,21 @@ uint64_t  __attribute__((export_name("TS_CommitmentUpdate_clone"))) TS_Commitmen
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_CommitmentUpdate_eq"))) TS_CommitmentUpdate_eq(uint64_t a, uint64_t b) {
+       LDKCommitmentUpdate a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommitmentUpdate b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommitmentUpdate_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ChannelMessageHandler_free"))) TS_ChannelMessageHandler_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -34520,6 +35459,17 @@ uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_OnionMessageH
        return tag_ptr(ret_ret, true);
 }
 
+uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomOnionMessageHandler"))) TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(uint64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCustomOnionMessageHandler* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageHandler), "LDKCustomOnionMessageHandler");
+       *ret_ret = IgnoringMessageHandler_as_CustomOnionMessageHandler(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 uint64_t  __attribute__((export_name("TS_IgnoringMessageHandler_as_CustomMessageReader"))) TS_IgnoringMessageHandler_as_CustomMessageReader(uint64_t this_arg) {
        LDKIgnoringMessageHandler this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -34802,7 +35752,7 @@ void  __attribute__((export_name("TS_PeerManager_free"))) TS_PeerManager_free(ui
        PeerManager_free(this_obj_conv);
 }
 
-uint64_t  __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int64_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
+uint64_t  __attribute__((export_name("TS_PeerManager_new"))) TS_PeerManager_new(uint64_t message_handler, int8_tArray our_node_secret, int32_t current_time, int8_tArray ephemeral_random_data, uint64_t logger, uint64_t custom_message_handler) {
        LDKMessageHandler message_handler_conv;
        message_handler_conv.inner = untag_ptr(message_handler);
        message_handler_conv.is_owned = ptr_is_owned(message_handler);
@@ -35357,6 +36307,21 @@ uint64_t  __attribute__((export_name("TS_TxCreationKeys_new"))) TS_TxCreationKey
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_TxCreationKeys_eq"))) TS_TxCreationKeys_eq(uint64_t a, uint64_t b) {
+       LDKTxCreationKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTxCreationKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TxCreationKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 static inline uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg) {
        LDKTxCreationKeys ret_var = TxCreationKeys_clone(arg);
        uint64_t ret_ref = 0;
@@ -35586,6 +36551,21 @@ uint64_t  __attribute__((export_name("TS_ChannelPublicKeys_clone"))) TS_ChannelP
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelPublicKeys_eq"))) TS_ChannelPublicKeys_eq(uint64_t a, uint64_t b) {
+       LDKChannelPublicKeys a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelPublicKeys b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelPublicKeys_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ChannelPublicKeys_write"))) TS_ChannelPublicKeys_write(uint64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -35821,6 +36801,21 @@ uint64_t  __attribute__((export_name("TS_HTLCOutputInCommitment_clone"))) TS_HTL
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_HTLCOutputInCommitment_eq"))) TS_HTLCOutputInCommitment_eq(uint64_t a, uint64_t b) {
+       LDKHTLCOutputInCommitment a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKHTLCOutputInCommitment b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = HTLCOutputInCommitment_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_HTLCOutputInCommitment_write"))) TS_HTLCOutputInCommitment_write(uint64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -36741,6 +37736,21 @@ int64_t  __attribute__((export_name("TS_ClosingTransaction_hash"))) TS_ClosingTr
        return ret_conv;
 }
 
+jboolean  __attribute__((export_name("TS_ClosingTransaction_eq"))) TS_ClosingTransaction_eq(uint64_t a, uint64_t b) {
+       LDKClosingTransaction a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKClosingTransaction b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ClosingTransaction_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ClosingTransaction_new"))) TS_ClosingTransaction_new(int64_t to_holder_value_sat, int64_t to_counterparty_value_sat, int8_tArray to_holder_script, int8_tArray to_counterparty_script, uint64_t funding_outpoint) {
        LDKCVec_u8Z to_holder_script_ref;
        to_holder_script_ref.datalen = to_holder_script->arr_len;
@@ -37381,22 +38391,6 @@ void  __attribute__((export_name("TS_ChannelTypeFeatures_free"))) TS_ChannelType
        ChannelTypeFeatures_free(this_obj_conv);
 }
 
-uint64_t  __attribute__((export_name("TS_InitFeatures_known_channel_features"))) TS_InitFeatures_known_channel_features() {
-       LDKInitFeatures ret_var = InitFeatures_known_channel_features();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-uint64_t  __attribute__((export_name("TS_NodeFeatures_known_channel_features"))) TS_NodeFeatures_known_channel_features() {
-       LDKNodeFeatures ret_var = NodeFeatures_known_channel_features();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 uint64_t  __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_empty() {
        LDKInitFeatures ret_var = InitFeatures_empty();
        uint64_t ret_ref = 0;
@@ -37405,14 +38399,6 @@ uint64_t  __attribute__((export_name("TS_InitFeatures_empty"))) TS_InitFeatures_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_InitFeatures_known"))) TS_InitFeatures_known() {
-       LDKInitFeatures ret_var = InitFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_InitFeatures_requires_unknown_bits"))) TS_InitFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKInitFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37431,14 +38417,6 @@ uint64_t  __attribute__((export_name("TS_NodeFeatures_empty"))) TS_NodeFeatures_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_NodeFeatures_known"))) TS_NodeFeatures_known() {
-       LDKNodeFeatures ret_var = NodeFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_NodeFeatures_requires_unknown_bits"))) TS_NodeFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKNodeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37457,14 +38435,6 @@ uint64_t  __attribute__((export_name("TS_ChannelFeatures_empty"))) TS_ChannelFea
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_ChannelFeatures_known"))) TS_ChannelFeatures_known() {
-       LDKChannelFeatures ret_var = ChannelFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_ChannelFeatures_requires_unknown_bits"))) TS_ChannelFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKChannelFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37483,14 +38453,6 @@ uint64_t  __attribute__((export_name("TS_InvoiceFeatures_empty"))) TS_InvoiceFea
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_InvoiceFeatures_known"))) TS_InvoiceFeatures_known() {
-       LDKInvoiceFeatures ret_var = InvoiceFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_InvoiceFeatures_requires_unknown_bits"))) TS_InvoiceFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKInvoiceFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -37509,14 +38471,6 @@ uint64_t  __attribute__((export_name("TS_ChannelTypeFeatures_empty"))) TS_Channe
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_ChannelTypeFeatures_known"))) TS_ChannelTypeFeatures_known() {
-       LDKChannelTypeFeatures ret_var = ChannelTypeFeatures_known();
-       uint64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 jboolean  __attribute__((export_name("TS_ChannelTypeFeatures_requires_unknown_bits"))) TS_ChannelTypeFeatures_requires_unknown_bits(uint64_t this_arg) {
        LDKChannelTypeFeatures this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38962,6 +39916,21 @@ uint64_t  __attribute__((export_name("TS_ShutdownScript_clone"))) TS_ShutdownScr
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ShutdownScript_eq"))) TS_ShutdownScript_eq(uint64_t a, uint64_t b) {
+       LDKShutdownScript a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKShutdownScript b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ShutdownScript_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_InvalidShutdownScript_free"))) TS_InvalidShutdownScript_free(uint64_t this_obj) {
        LDKInvalidShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -39342,6 +40311,13 @@ uint64_t  __attribute__((export_name("TS_NetworkUpdate_node_failure"))) TS_Netwo
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NetworkUpdate_eq"))) TS_NetworkUpdate_eq(uint64_t a, uint64_t b) {
+       LDKNetworkUpdate* a_conv = (LDKNetworkUpdate*)untag_ptr(a);
+       LDKNetworkUpdate* b_conv = (LDKNetworkUpdate*)untag_ptr(b);
+       jboolean ret_conv = NetworkUpdate_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NetworkUpdate_write"))) TS_NetworkUpdate_write(uint64_t obj) {
        LDKNetworkUpdate* obj_conv = (LDKNetworkUpdate*)untag_ptr(obj);
        LDKCVec_u8Z ret_var = NetworkUpdate_write(obj_conv);
@@ -39658,6 +40634,21 @@ uint64_t  __attribute__((export_name("TS_ChannelUpdateInfo_clone"))) TS_ChannelU
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelUpdateInfo_eq"))) TS_ChannelUpdateInfo_eq(uint64_t a, uint64_t b) {
+       LDKChannelUpdateInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelUpdateInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelUpdateInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_ChannelUpdateInfo_write"))) TS_ChannelUpdateInfo_write(uint64_t obj) {
        LDKChannelUpdateInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -39906,6 +40897,21 @@ uint64_t  __attribute__((export_name("TS_ChannelInfo_clone"))) TS_ChannelInfo_cl
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ChannelInfo_eq"))) TS_ChannelInfo_eq(uint64_t a, uint64_t b) {
+       LDKChannelInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 uint64_t  __attribute__((export_name("TS_ChannelInfo_get_directional_info"))) TS_ChannelInfo_get_directional_info(uint64_t this_arg, int8_t channel_flags) {
        LDKChannelInfo this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -40482,6 +41488,21 @@ uint64_t  __attribute__((export_name("TS_NodeAnnouncementInfo_clone"))) TS_NodeA
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAnnouncementInfo_eq"))) TS_NodeAnnouncementInfo_eq(uint64_t a, uint64_t b) {
+       LDKNodeAnnouncementInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAnnouncementInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAnnouncementInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeAnnouncementInfo_write"))) TS_NodeAnnouncementInfo_write(uint64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40577,6 +41598,21 @@ uint64_t  __attribute__((export_name("TS_NodeAlias_clone"))) TS_NodeAlias_clone(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeAlias_eq"))) TS_NodeAlias_eq(uint64_t a, uint64_t b) {
+       LDKNodeAlias a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeAlias b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeAlias_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeAlias_write"))) TS_NodeAlias_write(uint64_t obj) {
        LDKNodeAlias obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40762,6 +41798,21 @@ uint64_t  __attribute__((export_name("TS_NodeInfo_clone"))) TS_NodeInfo_clone(ui
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_NodeInfo_eq"))) TS_NodeInfo_eq(uint64_t a, uint64_t b) {
+       LDKNodeInfo a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKNodeInfo b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 int8_tArray  __attribute__((export_name("TS_NodeInfo_write"))) TS_NodeInfo_write(uint64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -40984,25 +42035,25 @@ void  __attribute__((export_name("TS_NetworkGraph_channel_failed"))) TS_NetworkG
        NetworkGraph_channel_failed(&this_arg_conv, short_channel_id, is_permanent);
 }
 
-void  __attribute__((export_name("TS_NetworkGraph_node_failed"))) TS_NetworkGraph_node_failed(uint64_t this_arg, int8_tArray _node_id, jboolean is_permanent) {
+void  __attribute__((export_name("TS_NetworkGraph_node_failed_permanent"))) TS_NetworkGraph_node_failed_permanent(uint64_t this_arg, int8_tArray node_id) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKPublicKey _node_id_ref;
-       CHECK(_node_id->arr_len == 33);
-       memcpy(_node_id_ref.compressed_form, _node_id->elems, 33); FREE(_node_id);
-       NetworkGraph_node_failed(&this_arg_conv, _node_id_ref, is_permanent);
+       LDKPublicKey node_id_ref;
+       CHECK(node_id->arr_len == 33);
+       memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
+       NetworkGraph_node_failed_permanent(&this_arg_conv, node_id_ref);
 }
 
-void  __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_with_time"))) TS_NetworkGraph_remove_stale_channels_with_time(uint64_t this_arg, int64_t current_time_unix) {
+void  __attribute__((export_name("TS_NetworkGraph_remove_stale_channels_and_tracking_with_time"))) TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(uint64_t this_arg, int64_t current_time_unix) {
        LDKNetworkGraph this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       NetworkGraph_remove_stale_channels_with_time(&this_arg_conv, current_time_unix);
+       NetworkGraph_remove_stale_channels_and_tracking_with_time(&this_arg_conv, current_time_unix);
 }
 
 uint64_t  __attribute__((export_name("TS_NetworkGraph_update_channel"))) TS_NetworkGraph_update_channel(uint64_t this_arg, uint64_t msg) {
@@ -43053,6 +44104,63 @@ void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_liquidit
        ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
 }
 
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat"))) TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(&this_ptr_conv, val);
+}
+
+int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(uint64_t this_ptr) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = ProbabilisticScoringParameters_get_historical_no_updates_half_life(&this_ptr_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life"))) TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(uint64_t this_ptr, int64_t val) {
+       LDKProbabilisticScoringParameters this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       ProbabilisticScoringParameters_set_historical_no_updates_half_life(&this_ptr_conv, val);
+}
+
 int64_t  __attribute__((export_name("TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat"))) TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(uint64_t this_ptr) {
        LDKProbabilisticScoringParameters this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -43506,6 +44614,13 @@ uint64_t  __attribute__((export_name("TS_SendError_invalid_first_hop"))) TS_Send
        return ret_ref;
 }
 
+uint64_t  __attribute__((export_name("TS_SendError_invalid_message"))) TS_SendError_invalid_message() {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_invalid_message();
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 uint64_t  __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_buffer_full() {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_buffer_full();
@@ -43513,7 +44628,23 @@ uint64_t  __attribute__((export_name("TS_SendError_buffer_full"))) TS_SendError_
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger) {
+jboolean  __attribute__((export_name("TS_SendError_eq"))) TS_SendError_eq(uint64_t a, uint64_t b) {
+       LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
+       LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
+       jboolean ret_conv = SendError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_CustomOnionMessageHandler_free"))) TS_CustomOnionMessageHandler_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageHandler this_ptr_conv = *(LDKCustomOnionMessageHandler*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageHandler_free(this_ptr_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenger_new(uint64_t keys_manager, uint64_t logger, uint64_t custom_handler) {
        void* keys_manager_ptr = untag_ptr(keys_manager);
        CHECK_ACCESS(keys_manager_ptr);
        LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)(keys_manager_ptr);
@@ -43528,14 +44659,21 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_new"))) TS_OnionMessenge
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv);
+       void* custom_handler_ptr = untag_ptr(custom_handler);
+       CHECK_ACCESS(custom_handler_ptr);
+       LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
+       if (custom_handler_conv.free == LDKCustomOnionMessageHandler_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
+       }
+       LDKOnionMessenger ret_var = OnionMessenger_new(keys_manager_conv, logger_conv, custom_handler_conv);
        uint64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-uint64_t  __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) TS_OnionMessenger_send_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t reply_path) {
+uint64_t  __attribute__((export_name("TS_OnionMessenger_send_custom_onion_message"))) TS_OnionMessenger_send_custom_onion_message(uint64_t this_arg, ptrArray intermediate_nodes, uint64_t destination, uint64_t msg, uint64_t reply_path) {
        LDKOnionMessenger this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -43560,13 +44698,20 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_send_onion_message"))) T
        CHECK_ACCESS(destination_ptr);
        LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
        // WARNING: we may need a move here but no clone is available for LDKDestination
+       void* msg_ptr = untag_ptr(msg);
+       CHECK_ACCESS(msg_ptr);
+       LDKCustomOnionMessageContents msg_conv = *(LDKCustomOnionMessageContents*)(msg_ptr);
+       if (msg_conv.free == LDKCustomOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKCustomOnionMessageContents_JCalls_cloned(&msg_conv);
+       }
        LDKBlindedRoute reply_path_conv;
        reply_path_conv.inner = untag_ptr(reply_path);
        reply_path_conv.is_owned = ptr_is_owned(reply_path);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv.is_owned = false;
        LDKCResult_NoneSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneSendErrorZ), "LDKCResult_NoneSendErrorZ");
-       *ret_conv = OnionMessenger_send_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, reply_path_conv);
+       *ret_conv = OnionMessenger_send_custom_onion_message(&this_arg_conv, intermediate_nodes_constr, destination_conv, msg_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -43592,6 +44737,135 @@ uint64_t  __attribute__((export_name("TS_OnionMessenger_as_OnionMessageProvider"
        return tag_ptr(ret_ret, true);
 }
 
+static inline uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg) {
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(arg);
+       return tag_ptr(ret_ret, true);
+}
+int64_t  __attribute__((export_name("TS_CustomOnionMessageContents_clone_ptr"))) TS_CustomOnionMessageContents_clone_ptr(uint64_t arg) {
+       void* arg_ptr = untag_ptr(arg);
+       if (ptr_is_owned(arg)) { CHECK_ACCESS(arg_ptr); }
+       LDKCustomOnionMessageContents* arg_conv = (LDKCustomOnionMessageContents*)arg_ptr;
+       int64_t ret_conv = CustomOnionMessageContents_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_CustomOnionMessageContents_clone"))) TS_CustomOnionMessageContents_clone(uint64_t orig) {
+       void* orig_ptr = untag_ptr(orig);
+       if (ptr_is_owned(orig)) { CHECK_ACCESS(orig_ptr); }
+       LDKCustomOnionMessageContents* orig_conv = (LDKCustomOnionMessageContents*)orig_ptr;
+       LDKCustomOnionMessageContents* ret_ret = MALLOC(sizeof(LDKCustomOnionMessageContents), "LDKCustomOnionMessageContents");
+       *ret_ret = CustomOnionMessageContents_clone(orig_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+void  __attribute__((export_name("TS_CustomOnionMessageContents_free"))) TS_CustomOnionMessageContents_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKCustomOnionMessageContents this_ptr_conv = *(LDKCustomOnionMessageContents*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       CustomOnionMessageContents_free(this_ptr_conv);
+}
+
+void  __attribute__((export_name("TS_RapidGossipSync_free"))) TS_RapidGossipSync_free(uint64_t this_obj) {
+       LDKRapidGossipSync this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RapidGossipSync_free(this_obj_conv);
+}
+
+uint64_t  __attribute__((export_name("TS_RapidGossipSync_new"))) TS_RapidGossipSync_new(uint64_t network_graph) {
+       LDKNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKRapidGossipSync ret_var = RapidGossipSync_new(&network_graph_conv);
+       uint64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_RapidGossipSync_update_network_graph"))) TS_RapidGossipSync_update_network_graph(uint64_t this_arg, int8_tArray update_data) {
+       LDKRapidGossipSync this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKu8slice update_data_ref;
+       update_data_ref.datalen = update_data->arr_len;
+       update_data_ref.data = update_data->elems;
+       LDKCResult_u32GraphSyncErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u32GraphSyncErrorZ), "LDKCResult_u32GraphSyncErrorZ");
+       *ret_conv = RapidGossipSync_update_network_graph(&this_arg_conv, update_data_ref);
+       FREE(update_data);
+       return tag_ptr(ret_conv, true);
+}
+
+jboolean  __attribute__((export_name("TS_RapidGossipSync_is_initial_sync_complete"))) TS_RapidGossipSync_is_initial_sync_complete(uint64_t this_arg) {
+       LDKRapidGossipSync this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = RapidGossipSync_is_initial_sync_complete(&this_arg_conv);
+       return ret_conv;
+}
+
+void  __attribute__((export_name("TS_GraphSyncError_free"))) TS_GraphSyncError_free(uint64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKGraphSyncError this_ptr_conv = *(LDKGraphSyncError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       GraphSyncError_free(this_ptr_conv);
+}
+
+static inline uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg) {
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_clone(arg);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+int64_t  __attribute__((export_name("TS_GraphSyncError_clone_ptr"))) TS_GraphSyncError_clone_ptr(uint64_t arg) {
+       LDKGraphSyncError* arg_conv = (LDKGraphSyncError*)untag_ptr(arg);
+       int64_t ret_conv = GraphSyncError_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncError_clone(uint64_t orig) {
+       LDKGraphSyncError* orig_conv = (LDKGraphSyncError*)untag_ptr(orig);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_clone(orig_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_t a) {
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKDecodeError a_conv = *(LDKDecodeError*)(a_ptr);
+       a_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(a));
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_decode_error(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+uint64_t  __attribute__((export_name("TS_GraphSyncError_lightning_error"))) TS_GraphSyncError_lightning_error(uint64_t a) {
+       LDKLightningError a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = LightningError_clone(&a_conv);
+       LDKGraphSyncError *ret_copy = MALLOC(sizeof(LDKGraphSyncError), "LDKGraphSyncError");
+       *ret_copy = GraphSyncError_lightning_error(a_conv);
+       uint64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 void  __attribute__((export_name("TS_ParseError_free"))) TS_ParseError_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -43755,6 +45029,13 @@ uint64_t  __attribute__((export_name("TS_ParseError_skip"))) TS_ParseError_skip(
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ParseError_eq"))) TS_ParseError_eq(uint64_t a, uint64_t b) {
+       LDKParseError* a_conv = (LDKParseError*)untag_ptr(a);
+       LDKParseError* b_conv = (LDKParseError*)untag_ptr(b);
+       jboolean ret_conv = ParseError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_ParseOrSemanticError_free"))) TS_ParseOrSemanticError_free(uint64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -43803,6 +45084,13 @@ uint64_t  __attribute__((export_name("TS_ParseOrSemanticError_semantic_error")))
        return ret_ref;
 }
 
+jboolean  __attribute__((export_name("TS_ParseOrSemanticError_eq"))) TS_ParseOrSemanticError_eq(uint64_t a, uint64_t b) {
+       LDKParseOrSemanticError* a_conv = (LDKParseOrSemanticError*)untag_ptr(a);
+       LDKParseOrSemanticError* b_conv = (LDKParseOrSemanticError*)untag_ptr(b);
+       jboolean ret_conv = ParseOrSemanticError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 void  __attribute__((export_name("TS_Invoice_free"))) TS_Invoice_free(uint64_t this_obj) {
        LDKInvoice this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -45849,7 +47137,7 @@ uint64_t  __attribute__((export_name("TS_InFlightHtlcs_read"))) TS_InFlightHtlcs
        return tag_ptr(ret_conv, true);
 }
 
-uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, uint64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -45862,6 +47150,13 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_js(network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -45873,11 +47168,11 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_with
        CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
        description_hash_conv = Sha256_clone(&description_hash_conv);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
-uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
+uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_duration_since_epoch"))) TS_create_invoice_from_channelmanager_and_duration_since_epoch(uint64_t channelmanager, uint64_t keys_manager, uint64_t logger, uint32_t network, uint64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs) {
        LDKChannelManager channelmanager_conv;
        channelmanager_conv.inner = untag_ptr(channelmanager);
        channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
@@ -45890,6 +47185,13 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKKeysInterface_JCalls_cloned(&keys_manager_conv);
        }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
        LDKCurrency network_conv = LDKCurrency_from_js(network);
        void* amt_msat_ptr = untag_ptr(amt_msat);
        CHECK_ACCESS(amt_msat_ptr);
@@ -45897,7 +47199,7 @@ uint64_t  __attribute__((export_name("TS_create_invoice_from_channelmanager_and_
        amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
        LDKStr description_conv = str_ref_to_owned_c(description);
        LDKCResult_InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceSignOrCreationErrorZ), "LDKCResult_InvoiceSignOrCreationErrorZ");
-       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
+       *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, keys_manager_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs);
        return tag_ptr(ret_conv, true);
 }
 
index fc23018e81ad0c8ba6314dd660e9d3a6cde974c4..4933b7c90bf30f1dab8086231b8ca1f82e3363f6 100644 (file)
@@ -17,7 +17,7 @@ imports.wasi_snapshot_preview1 = {
                for (var i = 0; i < iovec_array_len; i++) {
                        const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
                        console.log("[fd " + fd + "]: " + String.fromCharCode(...bytes_view));
-                       bytes_written += ptr_len_view[i*2+1];
+                       bytes_written += ptr_len_view[i*2+1]!;
                }
                const written_view = new Uint32Array(wasm.memory.buffer, bytes_written_ptr, 1);
                written_view[0] = bytes_written;
@@ -46,7 +46,7 @@ imports.wasi_snapshot_preview1 = {
                out_len_view[0] = 0;
                return 0;
        },
-       "environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
+       "environ_get": (_environ_ptr: number, _environ_buf_ptr: number) => {
                // This is called before fd_write to format + print panic messages,
                // but only if we have variables in environ_sizes_get, so shouldn't ever actually happen!
                console.log("wasi_snapshot_preview1:environ_get");
@@ -112,7 +112,7 @@ export async function initializeWasmFetch(uri: string) {
 export function uint5ArrToBytes(inputArray: Array<UInt5>): Uint8Array {
        const arr = new Uint8Array(inputArray.length);
        for (var i = 0; i < inputArray.length; i++) {
-               arr[i] = inputArray[i].getVal();
+               arr[i] = inputArray[i]!.getVal();
        }
        return arr;
 }
@@ -121,7 +121,7 @@ export function uint5ArrToBytes(inputArray: Array<UInt5>): Uint8Array {
 export function WitnessVersionArrToBytes(inputArray: Array<WitnessVersion>): Uint8Array {
        const arr = new Uint8Array(inputArray.length);
        for (var i = 0; i < inputArray.length; i++) {
-               arr[i] = inputArray[i].getVal();
+               arr[i] = inputArray[i]!.getVal();
        }
        return arr;
 }
@@ -129,7 +129,8 @@ export function WitnessVersionArrToBytes(inputArray: Array<WitnessVersion>): Uin
 
 
 /* @internal */
-export function encodeUint8Array (inputArray: Uint8Array): number {
+export function encodeUint8Array (inputArray: Uint8Array|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc(inputArray.length + 8);
        const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
        arrayLengthView[0] = BigInt(inputArray.length);
@@ -138,7 +139,8 @@ export function encodeUint8Array (inputArray: Uint8Array): number {
        return cArrayPointer;
 }
 /* @internal */
-export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
+export function encodeUint32Array (inputArray: Uint32Array|Array<number>|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc((inputArray.length + 2) * 4);
        const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
        arrayLengthView[0] = BigInt(inputArray.length);
@@ -147,24 +149,25 @@ export function encodeUint32Array (inputArray: Uint32Array|Array<number>): numbe
        return cArrayPointer;
 }
 /* @internal */
-export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
+export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 8);
-       const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
-       arrayMemoryView.set(inputArray, 1);
+       const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, inputArray.length + 1);
        arrayMemoryView[0] = BigInt(inputArray.length);
+       arrayMemoryView.set(inputArray, 1);
        return cArrayPointer;
 }
 
 /* @internal */
-export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
-       if (arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
+export function check_arr_len(arr: Uint8Array|null, len: number): Uint8Array|null {
+       if (arr !== null && arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
        return arr;
 }
 
 /* @internal */
 export function getArrayLength(arrayPointer: number): number {
        const arraySizeViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer, 1);
-       const len = arraySizeViewer[0];
+       const len = arraySizeViewer[0]!;
        if (len >= (2n ** 32n)) throw new Error("Bogus Array Size");
        return Number(len % (2n ** 32n));
 }
@@ -219,19 +222,19 @@ export function freeWasmMemory(pointer: number) { wasm.TS_free(pointer); }
 /* @internal */
 export function getU64ArrayElem(arrayPointer: number, idx: number): bigint {
        const actualArrayViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 /* @internal */
 export function getU32ArrayElem(arrayPointer: number, idx: number): number {
        const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 /* @internal */
 export function getU8ArrayElem(arrayPointer: number, idx: number): number {
        const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 
@@ -288,73 +291,88 @@ export enum COption_NoneZ {
 }
 
 /**
- * An error enum representing a failure to persist a channel monitor update.
+ * An enum representing the status of a channel monitor update persistence.
  */
-export enum ChannelMonitorUpdateErr {
+export enum ChannelMonitorUpdateStatus {
+       /**
+        * The update has been durably persisted and all copies of the relevant [`ChannelMonitor`]
+       have been updated.
+       
+       This includes performing any `fsync()` calls required to ensure the update is guaranteed to
+       be available on restart even if the application crashes.
+        */
+       LDKChannelMonitorUpdateStatus_Completed,
        /**
         * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
        our state failed, but is expected to succeed at some point in the future).
        
        Such a failure will \"freeze\" a channel, preventing us from revoking old states or
-       submitting new commitment transactions to the counterparty. Once the update(s) that failed
-       have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
-       via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
-       operational state.
-       
-       Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
-       you return a TemporaryFailure you must ensure that it is written to disk safely before
-       writing out the latest ChannelManager state.
+       submitting new commitment transactions to the counterparty. Once the update(s) which failed
+       have been successfully applied, a [`MonitorEvent::Completed`] can be used to restore the
+       channel to an operational state.
        
-       Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
-       (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
-       to claim it on this channel) and those updates must be applied wherever they can be. At
-       least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
-       be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
-       the channel which would invalidate previous ChannelMonitors are not made when a channel has
-       been \"frozen\".
+       Note that a given [`ChannelManager`] will *never* re-generate a [`ChannelMonitorUpdate`].
+       If you return this error you must ensure that it is written to disk safely before writing
+       the latest [`ChannelManager`] state, or you should return [`PermanentFailure`] instead.
        
-       Note that even if updates made after TemporaryFailure succeed you must still provide a
-       [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
-       normal channel operation. Note that this is normally generated through a call to
-       [`ChainMonitor::channel_monitor_updated`].
+       Even when a channel has been \"frozen\", updates to the [`ChannelMonitor`] can continue to
+       occur (e.g. if an inbound HTLC which we forwarded was claimed upstream, resulting in us
+       attempting to claim it on this channel) and those updates must still be persisted.
        
-       Note that the update being processed here will not be replayed for you when you return a
-       [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
-       you must store the update itself on your own local disk prior to returning a
-       TemporaryFailure. You may, of course, employ a journaling approach, storing only the
-       ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
-       reload-time.
+       No updates to the channel will be made which could invalidate other [`ChannelMonitor`]s
+       until a [`MonitorEvent::Completed`] is provided, even if you return no error on a later
+       monitor update for the same channel.
        
        For deployments where a copy of ChannelMonitors and other local state are backed up in a
        remote location (with local copies persisted immediately), it is anticipated that all
-       updates will return TemporaryFailure until the remote copies could be updated.
+       updates will return [`InProgress`] until the remote copies could be updated.
        
-       [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
+       [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+       [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
+       [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
-       LDKChannelMonitorUpdateErr_TemporaryFailure,
+       LDKChannelMonitorUpdateStatus_InProgress,
        /**
-        * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
-       different watchtower and cannot update with all watchtowers that were previously informed
-       of this channel).
+        * Used to indicate no further channel monitor updates will be allowed (likely a disk failure
+       or a remote copy of this [`ChannelMonitor`] is no longer reachable and thus not updatable).
+       
+       When this is returned, [`ChannelManager`] will force-close the channel but *not* broadcast
+       our current commitment transaction. This avoids a dangerous case where a local disk failure
+       (e.g. the Linux-default remounting of the disk as read-only) causes [`PermanentFailure`]s
+       for all monitor updates. If we were to broadcast our latest commitment transaction and then
+       restart, we could end up reading a previous [`ChannelMonitor`] and [`ChannelManager`],
+       revoking our now-broadcasted state before seeing it confirm and losing all our funds.
        
-       At reception of this error, ChannelManager will force-close the channel and return at
-       least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
-       least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
-       update must be rejected.
+       Note that this is somewhat of a tradeoff - if the disk is really gone and we may have lost
+       the data permanently, we really should broadcast immediately. If the data can be recovered
+       with manual intervention, we'd rather close the channel, rejecting future updates to it,
+       and broadcast the latest state only if we have HTLCs to claim which are timing out (which
+       we do as long as blocks are connected).
        
-       This failure may also signal a failure to update the local persisted copy of one of
-       the channel monitor instance.
+       In order to broadcast the latest local commitment transaction, you'll need to call
+       [`ChannelMonitor::get_latest_holder_commitment_txn`] and broadcast the resulting
+       transactions once you've safely ensured no further channel updates can be generated by your
+       [`ChannelManager`].
        
-       Note that even when you fail a holder commitment transaction update, you must store the
-       update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
-       broadcasts it (e.g distributed channel-monitor deployment)
+       Note that at least one final [`ChannelMonitorUpdate`] may still be provided, which must
+       still be processed by a running [`ChannelMonitor`]. This final update will mark the
+       [`ChannelMonitor`] as finalized, ensuring no further updates (e.g. revocation of the latest
+       commitment transaction) are allowed.
+       
+       Note that even if you return a [`PermanentFailure`] due to unavailability of secondary
+       [`ChannelMonitor`] copies, you should still make an attempt to store the update where
+       possible to ensure you can claim HTLC outputs on the latest commitment transaction
+       broadcasted later.
        
        In case of distributed watchtowers deployment, the new version must be written to disk, as
        state may have been stored but rejected due to a block forcing a commitment broadcast. This
        storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
        lagging behind on block processing.
+       
+       [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+       [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
-       LDKChannelMonitorUpdateErr_PermanentFailure,
+       LDKChannelMonitorUpdateStatus_PermanentFailure,
        
 }
 
@@ -736,6 +754,26 @@ export function CResult_BlindedRouteNoneZ_get_err(owner: bigint): void {
        }
        const nativeResponseValue = wasm.TS_CResult_BlindedRouteNoneZ_get_err(owner);
        // debug statements here
+}
+/* @internal */
+export class LDKDecodeError {
+       protected constructor() {}
+}
+/* @internal */
+export function LDKDecodeError_ty_from_ptr(ptr: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKDecodeError_ty_from_ptr(ptr);
+       return nativeResponseValue;
+}
+/* @internal */
+export function LDKDecodeError_Io_get_io(ptr: bigint): IOError {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKDecodeError_Io_get_io(ptr);
+       return nativeResponseValue;
 }
        // struct LDKBlindedRoute CResult_BlindedRouteDecodeErrorZ_get_ok(LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR owner);
 /* @internal */
@@ -2474,24 +2512,6 @@ export function C2Tuple_usizeTransactionZ_get_b(owner: bigint): number {
        }
        const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
        return nativeResponseValue;
-}
-       // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: bigint): void {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
-       // debug statements here
-}
-       // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: bigint): ChannelMonitorUpdateErr {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
-       return nativeResponseValue;
 }
 /* @internal */
 export class LDKMonitorEvent {
@@ -2522,19 +2542,19 @@ export function LDKMonitorEvent_CommitmentTxConfirmed_get_commitment_tx_confirme
        return nativeResponseValue;
 }
 /* @internal */
-export function LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr: bigint): bigint {
+export function LDKMonitorEvent_Completed_get_funding_txo(ptr: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
+       const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_funding_txo(ptr);
        return nativeResponseValue;
 }
 /* @internal */
-export function LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr: bigint): bigint {
+export function LDKMonitorEvent_Completed_get_monitor_update_id(ptr: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
+       const nativeResponseValue = wasm.TS_LDKMonitorEvent_Completed_get_monitor_update_id(ptr);
        return nativeResponseValue;
 }
 /* @internal */
@@ -3325,6 +3345,24 @@ export function CResult_SecretKeyNoneZ_get_err(owner: bigint): void {
        }
        const nativeResponseValue = wasm.TS_CResult_SecretKeyNoneZ_get_err(owner);
        // debug statements here
+}
+       // struct LDKPublicKey CResult_PublicKeyNoneZ_get_ok(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_PublicKeyNoneZ_get_ok(owner: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_get_ok(owner);
+       return nativeResponseValue;
+}
+       // void CResult_PublicKeyNoneZ_get_err(LDKCResult_PublicKeyNoneZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_PublicKeyNoneZ_get_err(owner: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_get_err(owner);
+       // debug statements here
 }
 /* @internal */
 export class LDKCOption_ScalarZ {
@@ -3377,6 +3415,7 @@ export interface LDKBaseSign {
        sign_justice_revoked_htlc (justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: bigint): bigint;
        sign_counterparty_htlc_transaction (htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: bigint): bigint;
        sign_closing_transaction (closing_tx: bigint): bigint;
+       sign_holder_anchor_input (anchor_tx: number, input: number): bigint;
        sign_channel_announcement (msg: bigint): bigint;
        ready_channel (channel_parameters: bigint): void;
 }
@@ -3491,6 +3530,15 @@ export function BaseSign_sign_closing_transaction(this_arg: bigint, closing_tx:
        }
        const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
        return nativeResponseValue;
+}
+       // LDKCResult_SignatureNoneZ BaseSign_sign_holder_anchor_input LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction anchor_tx, uintptr_t input
+/* @internal */
+export function BaseSign_sign_holder_anchor_input(this_arg: bigint, anchor_tx: number, input: number): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_BaseSign_sign_holder_anchor_input(this_arg, anchor_tx, input);
+       return nativeResponseValue;
 }
        // LDKCResult_C2Tuple_SignatureSignatureZNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
 /* @internal */
@@ -4065,8 +4113,8 @@ export function CResult_PhantomRouteHintsDecodeErrorZ_get_err(owner: bigint): bi
 }
 /* @internal */
 export interface LDKWatch {
-       watch_channel (funding_txo: bigint, monitor: bigint): bigint;
-       update_channel (funding_txo: bigint, update: bigint): bigint;
+       watch_channel (funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus;
+       update_channel (funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus;
        release_pending_monitor_events (): number;
 }
 
@@ -4082,18 +4130,18 @@ export function LDKWatch_new(impl: LDKWatch): [bigint, number] {
        js_objs[i] = new WeakRef(impl);
        return [wasm.TS_LDKWatch_new(i), i];
 }
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
+       // LDKChannelMonitorUpdateStatus Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
 /* @internal */
-export function Watch_watch_channel(this_arg: bigint, funding_txo: bigint, monitor: bigint): bigint {
+export function Watch_watch_channel(this_arg: bigint, funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
        const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
        return nativeResponseValue;
 }
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
+       // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
 /* @internal */
-export function Watch_update_channel(this_arg: bigint, funding_txo: bigint, update: bigint): bigint {
+export function Watch_update_channel(this_arg: bigint, funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
@@ -4138,6 +4186,7 @@ export function BroadcasterInterface_broadcast_transaction(this_arg: bigint, tx:
 /* @internal */
 export interface LDKKeysInterface {
        get_node_secret (recipient: Recipient): bigint;
+       get_node_id (recipient: Recipient): bigint;
        ecdh (recipient: Recipient, other_key: number, tweak: bigint): bigint;
        get_destination_script (): number;
        get_shutdown_scriptpubkey (): bigint;
@@ -4168,6 +4217,15 @@ export function KeysInterface_get_node_secret(this_arg: bigint, recipient: Recip
        }
        const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg, recipient);
        return nativeResponseValue;
+}
+       // LDKCResult_PublicKeyNoneZ KeysInterface_get_node_id LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient
+/* @internal */
+export function KeysInterface_get_node_id(this_arg: bigint, recipient: Recipient): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_KeysInterface_get_node_id(this_arg, recipient);
+       return nativeResponseValue;
 }
        // LDKCResult_SharedSecretNoneZ KeysInterface_ecdh LDKKeysInterface *NONNULL_PTR this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak
 /* @internal */
@@ -5093,6 +5151,80 @@ export function C2Tuple_PublicKeyTypeZ_get_b(owner: bigint): bigint {
        return nativeResponseValue;
 }
 /* @internal */
+export interface LDKCustomOnionMessageContents {
+       tlv_type (): bigint;
+       write (): number;
+}
+
+/* @internal */
+export function LDKCustomOnionMessageContents_new(impl: LDKCustomOnionMessageContents): [bigint, number] {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       var new_obj_idx = js_objs.length;
+       for (var i = 0; i < js_objs.length; i++) {
+               if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+       }
+       js_objs[i] = new WeakRef(impl);
+       return [wasm.TS_LDKCustomOnionMessageContents_new(i), i];
+}
+       // uint64_t CustomOnionMessageContents_tlv_type LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+/* @internal */
+export function CustomOnionMessageContents_tlv_type(this_arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageContents_tlv_type(this_arg);
+       return nativeResponseValue;
+}
+       // LDKCVec_u8Z CustomOnionMessageContents_write LDKCustomOnionMessageContents *NONNULL_PTR this_arg
+/* @internal */
+export function CustomOnionMessageContents_write(this_arg: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageContents_write(this_arg);
+       return nativeResponseValue;
+}
+/* @internal */
+export class LDKCOption_CustomOnionMessageContentsZ {
+       protected constructor() {}
+}
+/* @internal */
+export function LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr);
+       return nativeResponseValue;
+}
+/* @internal */
+export function LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr);
+       return nativeResponseValue;
+}
+       // struct LDKCOption_CustomOnionMessageContentsZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(owner);
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(owner);
+       return nativeResponseValue;
+}
+/* @internal */
 export class LDKCOption_NetAddressZ {
        protected constructor() {}
 }
@@ -5203,6 +5335,52 @@ export function CResult_NoneSendErrorZ_get_err(owner: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_CResult_NoneSendErrorZ_get_err(owner);
        return nativeResponseValue;
+}
+/* @internal */
+export class LDKGraphSyncError {
+       protected constructor() {}
+}
+/* @internal */
+export function LDKGraphSyncError_ty_from_ptr(ptr: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKGraphSyncError_ty_from_ptr(ptr);
+       return nativeResponseValue;
+}
+/* @internal */
+export function LDKGraphSyncError_DecodeError_get_decode_error(ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKGraphSyncError_DecodeError_get_decode_error(ptr);
+       return nativeResponseValue;
+}
+/* @internal */
+export function LDKGraphSyncError_LightningError_get_lightning_error(ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_LDKGraphSyncError_LightningError_get_lightning_error(ptr);
+       return nativeResponseValue;
+}
+       // uint32_t CResult_u32GraphSyncErrorZ_get_ok(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_get_ok(owner: bigint): number {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_get_ok(owner);
+       return nativeResponseValue;
+}
+       // struct LDKGraphSyncError CResult_u32GraphSyncErrorZ_get_err(LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_get_err(owner: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_get_err(owner);
+       return nativeResponseValue;
 }
        // void CResult_NoneErrorZ_get_ok(LDKCResult_NoneErrorZ *NONNULL_PTR owner);
 /* @internal */
@@ -6372,8 +6550,8 @@ export function Confirm_get_relevant_txids(this_arg: bigint): number {
 }
 /* @internal */
 export interface LDKPersist {
-       persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): bigint;
-       update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint;
+       persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
+       update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
 }
 
 /* @internal */
@@ -6388,18 +6566,18 @@ export function LDKPersist_new(impl: LDKPersist): [bigint, number] {
        js_objs[i] = new WeakRef(impl);
        return [wasm.TS_LDKPersist_new(i), i];
 }
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
 /* @internal */
-export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): bigint {
+export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
        const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
        return nativeResponseValue;
 }
-       // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
 /* @internal */
-export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint {
+export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
@@ -6424,7 +6602,7 @@ export interface LDKChannelMessageHandler {
        handle_update_fee (their_node_id: number, msg: bigint): void;
        handle_announcement_signatures (their_node_id: number, msg: bigint): void;
        peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
-       peer_connected (their_node_id: number, msg: bigint): void;
+       peer_connected (their_node_id: number, msg: bigint): bigint;
        handle_channel_reestablish (their_node_id: number, msg: bigint): void;
        handle_channel_update (their_node_id: number, msg: bigint): void;
        handle_error (their_node_id: number, msg: bigint): void;
@@ -6588,14 +6766,14 @@ export function ChannelMessageHandler_peer_disconnected(this_arg: bigint, their_
        const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, their_node_id, no_connection_possible);
        // debug statements here
 }
-       // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
+       // LDKCResult_NoneNoneZ ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
 /* @internal */
-export function ChannelMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, msg: bigint): void {
+export function ChannelMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
        const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, their_node_id, msg);
-       // debug statements here
+       return nativeResponseValue;
 }
        // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
 /* @internal */
@@ -6649,7 +6827,7 @@ export interface LDKRoutingMessageHandler {
        handle_channel_update (msg: bigint): bigint;
        get_next_channel_announcement (starting_point: bigint): bigint;
        get_next_node_announcement (starting_point: number): bigint;
-       peer_connected (their_node_id: number, init: bigint): void;
+       peer_connected (their_node_id: number, init: bigint): bigint;
        handle_reply_channel_range (their_node_id: number, msg: bigint): bigint;
        handle_reply_short_channel_ids_end (their_node_id: number, msg: bigint): bigint;
        handle_query_channel_range (their_node_id: number, msg: bigint): bigint;
@@ -6715,14 +6893,14 @@ export function RoutingMessageHandler_get_next_node_announcement(this_arg: bigin
        const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcement(this_arg, starting_point);
        return nativeResponseValue;
 }
-       // void RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+       // LDKCResult_NoneNoneZ RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
 /* @internal */
-export function RoutingMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): void {
+export function RoutingMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
        const nativeResponseValue = wasm.TS_RoutingMessageHandler_peer_connected(this_arg, their_node_id, init);
-       // debug statements here
+       return nativeResponseValue;
 }
        // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
 /* @internal */
@@ -6781,7 +6959,7 @@ export function RoutingMessageHandler_provided_init_features(this_arg: bigint, t
 /* @internal */
 export interface LDKOnionMessageHandler {
        handle_onion_message (peer_node_id: number, msg: bigint): void;
-       peer_connected (their_node_id: number, init: bigint): void;
+       peer_connected (their_node_id: number, init: bigint): bigint;
        peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
        provided_node_features (): bigint;
        provided_init_features (their_node_id: number): bigint;
@@ -6808,14 +6986,14 @@ export function OnionMessageHandler_handle_onion_message(this_arg: bigint, peer_
        const nativeResponseValue = wasm.TS_OnionMessageHandler_handle_onion_message(this_arg, peer_node_id, msg);
        // debug statements here
 }
-       // void OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+       // LDKCResult_NoneNoneZ OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
 /* @internal */
-export function OnionMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): void {
+export function OnionMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
        const nativeResponseValue = wasm.TS_OnionMessageHandler_peer_connected(this_arg, their_node_id, init);
-       // debug statements here
+       return nativeResponseValue;
 }
        // void OnionMessageHandler_peer_disconnected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
 /* @internal */
@@ -6907,6 +7085,42 @@ export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: bigint)
        return nativeResponseValue;
 }
 /* @internal */
+export interface LDKCustomOnionMessageHandler {
+       handle_custom_message (msg: bigint): void;
+       read_custom_message (message_type: bigint, buffer: number): bigint;
+}
+
+/* @internal */
+export function LDKCustomOnionMessageHandler_new(impl: LDKCustomOnionMessageHandler): [bigint, number] {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       var new_obj_idx = js_objs.length;
+       for (var i = 0; i < js_objs.length; i++) {
+               if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+       }
+       js_objs[i] = new WeakRef(impl);
+       return [wasm.TS_LDKCustomOnionMessageHandler_new(i), i];
+}
+       // void CustomOnionMessageHandler_handle_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, struct LDKCustomOnionMessageContents msg
+/* @internal */
+export function CustomOnionMessageHandler_handle_custom_message(this_arg: bigint, msg: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_handle_custom_message(this_arg, msg);
+       // debug statements here
+}
+       // LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CustomOnionMessageHandler_read_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, uint64_t message_type, struct LDKu8slice buffer
+/* @internal */
+export function CustomOnionMessageHandler_read_custom_message(this_arg: bigint, message_type: bigint, buffer: number): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_read_custom_message(this_arg, message_type, buffer);
+       return nativeResponseValue;
+}
+/* @internal */
 export interface LDKSocketDescriptor {
        send_data (data: number, resume_read: boolean): number;
        disconnect_socket (): void;
@@ -9471,60 +9685,6 @@ export function CVec_TxidZ_free(_res: number): void {
        }
        const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
        // debug statements here
-}
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_ok(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
-       return nativeResponseValue;
-}
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
-       return nativeResponseValue;
-}
-       // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: bigint): boolean {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
-       return nativeResponseValue;
-}
-       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: bigint): void {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
-       // debug statements here
-}
-       // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: bigint): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
-       return nativeResponseValue;
-}
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
-/* @internal */
-export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: bigint): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
-       return nativeResponseValue;
 }
        // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
 /* @internal */
@@ -11226,6 +11386,60 @@ export function CResult_SecretKeyNoneZ_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_CResult_SecretKeyNoneZ_clone(orig);
        return nativeResponseValue;
+}
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_ok(struct LDKPublicKey o);
+/* @internal */
+export function CResult_PublicKeyNoneZ_ok(o: number): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_ok(o);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_err(void);
+/* @internal */
+export function CResult_PublicKeyNoneZ_err(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_err();
+       return nativeResponseValue;
+}
+       // bool CResult_PublicKeyNoneZ_is_ok(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_PublicKeyNoneZ_is_ok(o: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_is_ok(o);
+       return nativeResponseValue;
+}
+       // void CResult_PublicKeyNoneZ_free(struct LDKCResult_PublicKeyNoneZ _res);
+/* @internal */
+export function CResult_PublicKeyNoneZ_free(_res: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_free(_res);
+       // debug statements here
+}
+       // uint64_t CResult_PublicKeyNoneZ_clone_ptr(LDKCResult_PublicKeyNoneZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_PublicKeyNoneZ_clone_ptr(arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_clone_ptr(arg);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_clone(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_PublicKeyNoneZ_clone(orig: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_PublicKeyNoneZ_clone(orig);
+       return nativeResponseValue;
 }
        // struct LDKCOption_ScalarZ COption_ScalarZ_some(struct LDKBigEndianScalar o);
 /* @internal */
@@ -14043,6 +14257,105 @@ export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number): void {
        }
        const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
        // debug statements here
+}
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_some(struct LDKCustomOnionMessageContents o);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_some(o: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_some(o);
+       return nativeResponseValue;
+}
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_none(void);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_none(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_none();
+       return nativeResponseValue;
+}
+       // void COption_CustomOnionMessageContentsZ_free(struct LDKCOption_CustomOnionMessageContentsZ _res);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_free(_res: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_free(_res);
+       // debug statements here
+}
+       // uint64_t COption_CustomOnionMessageContentsZ_clone_ptr(LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_clone_ptr(arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_clone_ptr(arg);
+       return nativeResponseValue;
+}
+       // struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_clone(const struct LDKCOption_CustomOnionMessageContentsZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_CustomOnionMessageContentsZ_clone(orig: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_COption_CustomOnionMessageContentsZ_clone(orig);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(struct LDKCOption_CustomOnionMessageContentsZ o);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(o);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(e);
+       return nativeResponseValue;
+}
+       // bool CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(o);
+       return nativeResponseValue;
+}
+       // void CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(_res);
+       // debug statements here
+}
+       // uint64_t CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(arg);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(orig);
+       return nativeResponseValue;
 }
        // struct LDKCOption_NetAddressZ COption_NetAddressZ_some(struct LDKNetAddress o);
 /* @internal */
@@ -14286,6 +14599,42 @@ export function CResult_NoneSendErrorZ_free(_res: bigint): void {
        }
        const nativeResponseValue = wasm.TS_CResult_NoneSendErrorZ_free(_res);
        // debug statements here
+}
+       // struct LDKCResult_u32GraphSyncErrorZ CResult_u32GraphSyncErrorZ_ok(uint32_t o);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_ok(o: number): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_ok(o);
+       return nativeResponseValue;
+}
+       // struct LDKCResult_u32GraphSyncErrorZ CResult_u32GraphSyncErrorZ_err(struct LDKGraphSyncError e);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_err(e: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_err(e);
+       return nativeResponseValue;
+}
+       // bool CResult_u32GraphSyncErrorZ_is_ok(const struct LDKCResult_u32GraphSyncErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_is_ok(o: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_is_ok(o);
+       return nativeResponseValue;
+}
+       // void CResult_u32GraphSyncErrorZ_free(struct LDKCResult_u32GraphSyncErrorZ _res);
+/* @internal */
+export function CResult_u32GraphSyncErrorZ_free(_res: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CResult_u32GraphSyncErrorZ_free(_res);
+       // debug statements here
 }
        // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
 /* @internal */
@@ -16554,6 +16903,15 @@ export function ClosureReason_outdated_channel_manager(): bigint {
        }
        const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
        return nativeResponseValue;
+}
+       // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
+/* @internal */
+export function ClosureReason_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ClosureReason_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
 /* @internal */
@@ -16626,6 +16984,15 @@ export function HTLCDestination_failed_payment(payment_hash: number): bigint {
        }
        const nativeResponseValue = wasm.TS_HTLCDestination_failed_payment(payment_hash);
        return nativeResponseValue;
+}
+       // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
+/* @internal */
+export function HTLCDestination_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_HTLCDestination_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
 /* @internal */
@@ -17140,13 +17507,13 @@ export function APIError_channel_unavailable(err: number): bigint {
        const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
        return nativeResponseValue;
 }
-       // struct LDKAPIError APIError_monitor_update_failed(void);
+       // struct LDKAPIError APIError_monitor_update_in_progress(void);
 /* @internal */
-export function APIError_monitor_update_failed(): bigint {
+export function APIError_monitor_update_in_progress(): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
+       const nativeResponseValue = wasm.TS_APIError_monitor_update_in_progress();
        return nativeResponseValue;
 }
        // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
@@ -17157,6 +17524,15 @@ export function APIError_incompatible_shutdown_script(script: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
        return nativeResponseValue;
+}
+       // bool APIError_eq(const struct LDKAPIError *NONNULL_PTR a, const struct LDKAPIError *NONNULL_PTR b);
+/* @internal */
+export function APIError_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_APIError_eq(a, b);
+       return nativeResponseValue;
 }
        // void BigSize_free(struct LDKBigSize this_obj);
 /* @internal */
@@ -17220,6 +17596,15 @@ export function Hostname_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_Hostname_clone(orig);
        return nativeResponseValue;
+}
+       // bool Hostname_eq(const struct LDKHostname *NONNULL_PTR a, const struct LDKHostname *NONNULL_PTR b);
+/* @internal */
+export function Hostname_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_Hostname_eq(a, b);
+       return nativeResponseValue;
 }
        // MUST_USE_RES uint8_t Hostname_len(const struct LDKHostname *NONNULL_PTR this_arg);
 /* @internal */
@@ -18057,6 +18442,15 @@ export function ChannelConfig_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelConfig_eq(const struct LDKChannelConfig *NONNULL_PTR a, const struct LDKChannelConfig *NONNULL_PTR b);
+/* @internal */
+export function ChannelConfig_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelConfig_eq(a, b);
+       return nativeResponseValue;
 }
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
 /* @internal */
@@ -18264,6 +18658,15 @@ export function BestBlock_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
        return nativeResponseValue;
+}
+       // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b);
+/* @internal */
+export function BestBlock_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_BestBlock_eq(a, b);
+       return nativeResponseValue;
 }
        // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
 /* @internal */
@@ -18355,31 +18758,49 @@ export function Confirm_free(this_ptr: bigint): void {
        const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
        // debug statements here
 }
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_clone(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR orig);
+/* @internal */
+export function ChannelMonitorUpdateStatus_clone(orig: bigint): ChannelMonitorUpdateStatus {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_clone(orig);
+       return nativeResponseValue;
+}
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_completed(void);
+/* @internal */
+export function ChannelMonitorUpdateStatus_completed(): ChannelMonitorUpdateStatus {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_completed();
+       return nativeResponseValue;
+}
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_in_progress(void);
 /* @internal */
-export function ChannelMonitorUpdateErr_clone(orig: bigint): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_in_progress(): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
+       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_in_progress();
        return nativeResponseValue;
 }
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
+       // enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_permanent_failure(void);
 /* @internal */
-export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_permanent_failure(): ChannelMonitorUpdateStatus {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
+       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_permanent_failure();
        return nativeResponseValue;
 }
-       // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
+       // bool ChannelMonitorUpdateStatus_eq(const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR a, const enum LDKChannelMonitorUpdateStatus *NONNULL_PTR b);
 /* @internal */
-export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
+export function ChannelMonitorUpdateStatus_eq(a: bigint, b: bigint): boolean {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
+       const nativeResponseValue = wasm.TS_ChannelMonitorUpdateStatus_eq(a, b);
        return nativeResponseValue;
 }
        // void Watch_free(struct LDKWatch this_ptr);
@@ -18489,6 +18910,15 @@ export function WatchedOutput_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
        return nativeResponseValue;
+}
+       // bool WatchedOutput_eq(const struct LDKWatchedOutput *NONNULL_PTR a, const struct LDKWatchedOutput *NONNULL_PTR b);
+/* @internal */
+export function WatchedOutput_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_WatchedOutput_eq(a, b);
+       return nativeResponseValue;
 }
        // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
 /* @internal */
@@ -18823,13 +19253,13 @@ export function MonitorEvent_commitment_tx_confirmed(a: bigint): bigint {
        const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
        return nativeResponseValue;
 }
-       // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
+       // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
 /* @internal */
-export function MonitorEvent_update_completed(funding_txo: bigint, monitor_update_id: bigint): bigint {
+export function MonitorEvent_completed(funding_txo: bigint, monitor_update_id: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
+       const nativeResponseValue = wasm.TS_MonitorEvent_completed(funding_txo, monitor_update_id);
        return nativeResponseValue;
 }
        // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
@@ -18840,6 +19270,15 @@ export function MonitorEvent_update_failed(a: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
        return nativeResponseValue;
+}
+       // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b);
+/* @internal */
+export function MonitorEvent_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_MonitorEvent_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
 /* @internal */
@@ -18885,6 +19324,15 @@ export function HTLCUpdate_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
        return nativeResponseValue;
+}
+       // bool HTLCUpdate_eq(const struct LDKHTLCUpdate *NONNULL_PTR a, const struct LDKHTLCUpdate *NONNULL_PTR b);
+/* @internal */
+export function HTLCUpdate_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_HTLCUpdate_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
 /* @internal */
@@ -19470,6 +19918,15 @@ export function DelayedPaymentOutputDescriptor_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
        return nativeResponseValue;
+}
+       // bool DelayedPaymentOutputDescriptor_eq(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function DelayedPaymentOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
 /* @internal */
@@ -19596,6 +20053,15 @@ export function StaticPaymentOutputDescriptor_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
        return nativeResponseValue;
+}
+       // bool StaticPaymentOutputDescriptor_eq(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function StaticPaymentOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
 /* @internal */
@@ -19668,6 +20134,15 @@ export function SpendableOutputDescriptor_static_payment_output(a: bigint): bigi
        }
        const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
        return nativeResponseValue;
+}
+       // bool SpendableOutputDescriptor_eq(const struct LDKSpendableOutputDescriptor *NONNULL_PTR a, const struct LDKSpendableOutputDescriptor *NONNULL_PTR b);
+/* @internal */
+export function SpendableOutputDescriptor_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
 /* @internal */
@@ -21405,6 +21880,33 @@ export function ChannelManager_as_ChannelMessageHandler(this_arg: bigint): bigin
        }
        const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
        return nativeResponseValue;
+}
+       // struct LDKNodeFeatures provided_node_features(void);
+/* @internal */
+export function provided_node_features(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_provided_node_features();
+       return nativeResponseValue;
+}
+       // struct LDKChannelFeatures provided_channel_features(void);
+/* @internal */
+export function provided_channel_features(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_provided_channel_features();
+       return nativeResponseValue;
+}
+       // struct LDKInitFeatures provided_init_features(void);
+/* @internal */
+export function provided_init_features(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_provided_init_features();
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj);
 /* @internal */
@@ -21658,13 +22160,13 @@ export function create_from_hash(keys: bigint, min_value_msat: bigint, payment_h
        const nativeResponseValue = wasm.TS_create_from_hash(keys, min_value_msat, payment_hash, invoice_expiry_delta_secs, current_time);
        return nativeResponseValue;
 }
-       // void DecodeError_free(struct LDKDecodeError this_obj);
+       // void DecodeError_free(struct LDKDecodeError this_ptr);
 /* @internal */
-export function DecodeError_free(this_obj: bigint): void {
+export function DecodeError_free(this_ptr: bigint): void {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
+       const nativeResponseValue = wasm.TS_DecodeError_free(this_ptr);
        // debug statements here
 }
        // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
@@ -21684,6 +22186,78 @@ export function DecodeError_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
        return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_unknown_version(void);
+/* @internal */
+export function DecodeError_unknown_version(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_unknown_version();
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_unknown_required_feature(void);
+/* @internal */
+export function DecodeError_unknown_required_feature(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_unknown_required_feature();
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_invalid_value(void);
+/* @internal */
+export function DecodeError_invalid_value(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_invalid_value();
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_short_read(void);
+/* @internal */
+export function DecodeError_short_read(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_short_read();
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_bad_length_descriptor(void);
+/* @internal */
+export function DecodeError_bad_length_descriptor(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_bad_length_descriptor();
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_io(enum LDKIOError a);
+/* @internal */
+export function DecodeError_io(a: IOError): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_io(a);
+       return nativeResponseValue;
+}
+       // struct LDKDecodeError DecodeError_unsupported_compression(void);
+/* @internal */
+export function DecodeError_unsupported_compression(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_unsupported_compression();
+       return nativeResponseValue;
+}
+       // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b);
+/* @internal */
+export function DecodeError_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DecodeError_eq(a, b);
+       return nativeResponseValue;
 }
        // void Init_free(struct LDKInit this_obj);
 /* @internal */
@@ -21756,6 +22330,15 @@ export function Init_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_Init_clone(orig);
        return nativeResponseValue;
+}
+       // bool Init_eq(const struct LDKInit *NONNULL_PTR a, const struct LDKInit *NONNULL_PTR b);
+/* @internal */
+export function Init_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_Init_eq(a, b);
+       return nativeResponseValue;
 }
        // void ErrorMessage_free(struct LDKErrorMessage this_obj);
 /* @internal */
@@ -21828,6 +22411,15 @@ export function ErrorMessage_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
        return nativeResponseValue;
+}
+       // bool ErrorMessage_eq(const struct LDKErrorMessage *NONNULL_PTR a, const struct LDKErrorMessage *NONNULL_PTR b);
+/* @internal */
+export function ErrorMessage_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ErrorMessage_eq(a, b);
+       return nativeResponseValue;
 }
        // void WarningMessage_free(struct LDKWarningMessage this_obj);
 /* @internal */
@@ -21900,6 +22492,15 @@ export function WarningMessage_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_WarningMessage_clone(orig);
        return nativeResponseValue;
+}
+       // bool WarningMessage_eq(const struct LDKWarningMessage *NONNULL_PTR a, const struct LDKWarningMessage *NONNULL_PTR b);
+/* @internal */
+export function WarningMessage_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_WarningMessage_eq(a, b);
+       return nativeResponseValue;
 }
        // void Ping_free(struct LDKPing this_obj);
 /* @internal */
@@ -21972,6 +22573,15 @@ export function Ping_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_Ping_clone(orig);
        return nativeResponseValue;
+}
+       // bool Ping_eq(const struct LDKPing *NONNULL_PTR a, const struct LDKPing *NONNULL_PTR b);
+/* @internal */
+export function Ping_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_Ping_eq(a, b);
+       return nativeResponseValue;
 }
        // void Pong_free(struct LDKPong this_obj);
 /* @internal */
@@ -22026,6 +22636,15 @@ export function Pong_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_Pong_clone(orig);
        return nativeResponseValue;
+}
+       // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
+/* @internal */
+export function Pong_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_Pong_eq(a, b);
+       return nativeResponseValue;
 }
        // void OpenChannel_free(struct LDKOpenChannel this_obj);
 /* @internal */
@@ -22395,6 +23014,15 @@ export function OpenChannel_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
        return nativeResponseValue;
+}
+       // bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b);
+/* @internal */
+export function OpenChannel_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_OpenChannel_eq(a, b);
+       return nativeResponseValue;
 }
        // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
 /* @internal */
@@ -22692,6 +23320,15 @@ export function AcceptChannel_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
        return nativeResponseValue;
+}
+       // bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct LDKAcceptChannel *NONNULL_PTR b);
+/* @internal */
+export function AcceptChannel_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_AcceptChannel_eq(a, b);
+       return nativeResponseValue;
 }
        // void FundingCreated_free(struct LDKFundingCreated this_obj);
 /* @internal */
@@ -22800,6 +23437,15 @@ export function FundingCreated_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
        return nativeResponseValue;
+}
+       // bool FundingCreated_eq(const struct LDKFundingCreated *NONNULL_PTR a, const struct LDKFundingCreated *NONNULL_PTR b);
+/* @internal */
+export function FundingCreated_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_FundingCreated_eq(a, b);
+       return nativeResponseValue;
 }
        // void FundingSigned_free(struct LDKFundingSigned this_obj);
 /* @internal */
@@ -22872,6 +23518,15 @@ export function FundingSigned_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
        return nativeResponseValue;
+}
+       // bool FundingSigned_eq(const struct LDKFundingSigned *NONNULL_PTR a, const struct LDKFundingSigned *NONNULL_PTR b);
+/* @internal */
+export function FundingSigned_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_FundingSigned_eq(a, b);
+       return nativeResponseValue;
 }
        // void ChannelReady_free(struct LDKChannelReady this_obj);
 /* @internal */
@@ -22962,6 +23617,15 @@ export function ChannelReady_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelReady_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelReady_eq(const struct LDKChannelReady *NONNULL_PTR a, const struct LDKChannelReady *NONNULL_PTR b);
+/* @internal */
+export function ChannelReady_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelReady_eq(a, b);
+       return nativeResponseValue;
 }
        // void Shutdown_free(struct LDKShutdown this_obj);
 /* @internal */
@@ -23034,6 +23698,15 @@ export function Shutdown_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
        return nativeResponseValue;
+}
+       // bool Shutdown_eq(const struct LDKShutdown *NONNULL_PTR a, const struct LDKShutdown *NONNULL_PTR b);
+/* @internal */
+export function Shutdown_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_Shutdown_eq(a, b);
+       return nativeResponseValue;
 }
        // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
 /* @internal */
@@ -23106,6 +23779,15 @@ export function ClosingSignedFeeRange_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
        return nativeResponseValue;
+}
+       // bool ClosingSignedFeeRange_eq(const struct LDKClosingSignedFeeRange *NONNULL_PTR a, const struct LDKClosingSignedFeeRange *NONNULL_PTR b);
+/* @internal */
+export function ClosingSignedFeeRange_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_eq(a, b);
+       return nativeResponseValue;
 }
        // void ClosingSigned_free(struct LDKClosingSigned this_obj);
 /* @internal */
@@ -23214,6 +23896,15 @@ export function ClosingSigned_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
        return nativeResponseValue;
+}
+       // bool ClosingSigned_eq(const struct LDKClosingSigned *NONNULL_PTR a, const struct LDKClosingSigned *NONNULL_PTR b);
+/* @internal */
+export function ClosingSigned_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ClosingSigned_eq(a, b);
+       return nativeResponseValue;
 }
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
 /* @internal */
@@ -23331,6 +24022,15 @@ export function UpdateAddHTLC_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
        return nativeResponseValue;
+}
+       // bool UpdateAddHTLC_eq(const struct LDKUpdateAddHTLC *NONNULL_PTR a, const struct LDKUpdateAddHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateAddHTLC_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UpdateAddHTLC_eq(a, b);
+       return nativeResponseValue;
 }
        // void OnionMessage_free(struct LDKOnionMessage this_obj);
 /* @internal */
@@ -23376,6 +24076,15 @@ export function OnionMessage_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_OnionMessage_clone(orig);
        return nativeResponseValue;
+}
+       // bool OnionMessage_eq(const struct LDKOnionMessage *NONNULL_PTR a, const struct LDKOnionMessage *NONNULL_PTR b);
+/* @internal */
+export function OnionMessage_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_OnionMessage_eq(a, b);
+       return nativeResponseValue;
 }
        // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
 /* @internal */
@@ -23466,6 +24175,15 @@ export function UpdateFulfillHTLC_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
        return nativeResponseValue;
+}
+       // bool UpdateFulfillHTLC_eq(const struct LDKUpdateFulfillHTLC *NONNULL_PTR a, const struct LDKUpdateFulfillHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFulfillHTLC_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_eq(a, b);
+       return nativeResponseValue;
 }
        // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
 /* @internal */
@@ -23529,6 +24247,15 @@ export function UpdateFailHTLC_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
        return nativeResponseValue;
+}
+       // bool UpdateFailHTLC_eq(const struct LDKUpdateFailHTLC *NONNULL_PTR a, const struct LDKUpdateFailHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFailHTLC_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UpdateFailHTLC_eq(a, b);
+       return nativeResponseValue;
 }
        // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
 /* @internal */
@@ -23610,6 +24337,15 @@ export function UpdateFailMalformedHTLC_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
        return nativeResponseValue;
+}
+       // bool UpdateFailMalformedHTLC_eq(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR a, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR b);
+/* @internal */
+export function UpdateFailMalformedHTLC_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_eq(a, b);
+       return nativeResponseValue;
 }
        // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
 /* @internal */
@@ -23700,6 +24436,15 @@ export function CommitmentSigned_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
        return nativeResponseValue;
+}
+       // bool CommitmentSigned_eq(const struct LDKCommitmentSigned *NONNULL_PTR a, const struct LDKCommitmentSigned *NONNULL_PTR b);
+/* @internal */
+export function CommitmentSigned_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CommitmentSigned_eq(a, b);
+       return nativeResponseValue;
 }
        // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
 /* @internal */
@@ -23790,6 +24535,15 @@ export function RevokeAndACK_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
        return nativeResponseValue;
+}
+       // bool RevokeAndACK_eq(const struct LDKRevokeAndACK *NONNULL_PTR a, const struct LDKRevokeAndACK *NONNULL_PTR b);
+/* @internal */
+export function RevokeAndACK_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_RevokeAndACK_eq(a, b);
+       return nativeResponseValue;
 }
        // void UpdateFee_free(struct LDKUpdateFee this_obj);
 /* @internal */
@@ -23862,6 +24616,15 @@ export function UpdateFee_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
        return nativeResponseValue;
+}
+       // bool UpdateFee_eq(const struct LDKUpdateFee *NONNULL_PTR a, const struct LDKUpdateFee *NONNULL_PTR b);
+/* @internal */
+export function UpdateFee_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UpdateFee_eq(a, b);
+       return nativeResponseValue;
 }
        // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
 /* @internal */
@@ -23934,6 +24697,15 @@ export function DataLossProtect_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
        return nativeResponseValue;
+}
+       // bool DataLossProtect_eq(const struct LDKDataLossProtect *NONNULL_PTR a, const struct LDKDataLossProtect *NONNULL_PTR b);
+/* @internal */
+export function DataLossProtect_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_DataLossProtect_eq(a, b);
+       return nativeResponseValue;
 }
        // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
 /* @internal */
@@ -24015,6 +24787,15 @@ export function ChannelReestablish_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelReestablish_eq(const struct LDKChannelReestablish *NONNULL_PTR a, const struct LDKChannelReestablish *NONNULL_PTR b);
+/* @internal */
+export function ChannelReestablish_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelReestablish_eq(a, b);
+       return nativeResponseValue;
 }
        // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
 /* @internal */
@@ -24123,6 +24904,15 @@ export function AnnouncementSignatures_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
        return nativeResponseValue;
+}
+       // bool AnnouncementSignatures_eq(const struct LDKAnnouncementSignatures *NONNULL_PTR a, const struct LDKAnnouncementSignatures *NONNULL_PTR b);
+/* @internal */
+export function AnnouncementSignatures_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_AnnouncementSignatures_eq(a, b);
+       return nativeResponseValue;
 }
        // void NetAddress_free(struct LDKNetAddress this_ptr);
 /* @internal */
@@ -24195,6 +24985,15 @@ export function NetAddress_hostname(hostname: bigint, port: number): bigint {
        }
        const nativeResponseValue = wasm.TS_NetAddress_hostname(hostname, port);
        return nativeResponseValue;
+}
+       // bool NetAddress_eq(const struct LDKNetAddress *NONNULL_PTR a, const struct LDKNetAddress *NONNULL_PTR b);
+/* @internal */
+export function NetAddress_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NetAddress_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
 /* @internal */
@@ -24348,6 +25147,15 @@ export function UnsignedNodeAnnouncement_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
        return nativeResponseValue;
+}
+       // bool UnsignedNodeAnnouncement_eq(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR a, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function UnsignedNodeAnnouncement_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_eq(a, b);
+       return nativeResponseValue;
 }
        // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
 /* @internal */
@@ -24420,6 +25228,15 @@ export function NodeAnnouncement_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
        return nativeResponseValue;
+}
+       // bool NodeAnnouncement_eq(const struct LDKNodeAnnouncement *NONNULL_PTR a, const struct LDKNodeAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function NodeAnnouncement_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NodeAnnouncement_eq(a, b);
+       return nativeResponseValue;
 }
        // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
 /* @internal */
@@ -24573,6 +25390,15 @@ export function UnsignedChannelAnnouncement_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
        return nativeResponseValue;
+}
+       // bool UnsignedChannelAnnouncement_eq(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR a, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function UnsignedChannelAnnouncement_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_eq(a, b);
+       return nativeResponseValue;
 }
        // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
 /* @internal */
@@ -24699,6 +25525,15 @@ export function ChannelAnnouncement_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelAnnouncement_eq(const struct LDKChannelAnnouncement *NONNULL_PTR a, const struct LDKChannelAnnouncement *NONNULL_PTR b);
+/* @internal */
+export function ChannelAnnouncement_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelAnnouncement_eq(a, b);
+       return nativeResponseValue;
 }
        // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
 /* @internal */
@@ -24915,6 +25750,15 @@ export function UnsignedChannelUpdate_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
        return nativeResponseValue;
+}
+       // bool UnsignedChannelUpdate_eq(const struct LDKUnsignedChannelUpdate *NONNULL_PTR a, const struct LDKUnsignedChannelUpdate *NONNULL_PTR b);
+/* @internal */
+export function UnsignedChannelUpdate_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_eq(a, b);
+       return nativeResponseValue;
 }
        // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
 /* @internal */
@@ -24987,6 +25831,15 @@ export function ChannelUpdate_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelUpdate_eq(const struct LDKChannelUpdate *NONNULL_PTR a, const struct LDKChannelUpdate *NONNULL_PTR b);
+/* @internal */
+export function ChannelUpdate_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelUpdate_eq(a, b);
+       return nativeResponseValue;
 }
        // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
 /* @internal */
@@ -25077,6 +25930,15 @@ export function QueryChannelRange_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
        return nativeResponseValue;
+}
+       // bool QueryChannelRange_eq(const struct LDKQueryChannelRange *NONNULL_PTR a, const struct LDKQueryChannelRange *NONNULL_PTR b);
+/* @internal */
+export function QueryChannelRange_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_QueryChannelRange_eq(a, b);
+       return nativeResponseValue;
 }
        // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
 /* @internal */
@@ -25203,6 +26065,15 @@ export function ReplyChannelRange_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
        return nativeResponseValue;
+}
+       // bool ReplyChannelRange_eq(const struct LDKReplyChannelRange *NONNULL_PTR a, const struct LDKReplyChannelRange *NONNULL_PTR b);
+/* @internal */
+export function ReplyChannelRange_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ReplyChannelRange_eq(a, b);
+       return nativeResponseValue;
 }
        // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
 /* @internal */
@@ -25275,6 +26146,15 @@ export function QueryShortChannelIds_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
        return nativeResponseValue;
+}
+       // bool QueryShortChannelIds_eq(const struct LDKQueryShortChannelIds *NONNULL_PTR a, const struct LDKQueryShortChannelIds *NONNULL_PTR b);
+/* @internal */
+export function QueryShortChannelIds_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_QueryShortChannelIds_eq(a, b);
+       return nativeResponseValue;
 }
        // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
 /* @internal */
@@ -25347,6 +26227,15 @@ export function ReplyShortChannelIdsEnd_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
        return nativeResponseValue;
+}
+       // bool ReplyShortChannelIdsEnd_eq(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR a, const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR b);
+/* @internal */
+export function ReplyShortChannelIdsEnd_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_eq(a, b);
+       return nativeResponseValue;
 }
        // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
 /* @internal */
@@ -25437,6 +26326,15 @@ export function GossipTimestampFilter_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
        return nativeResponseValue;
+}
+       // bool GossipTimestampFilter_eq(const struct LDKGossipTimestampFilter *NONNULL_PTR a, const struct LDKGossipTimestampFilter *NONNULL_PTR b);
+/* @internal */
+export function GossipTimestampFilter_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GossipTimestampFilter_eq(a, b);
+       return nativeResponseValue;
 }
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
 /* @internal */
@@ -25734,6 +26632,15 @@ export function CommitmentUpdate_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
        return nativeResponseValue;
+}
+       // bool CommitmentUpdate_eq(const struct LDKCommitmentUpdate *NONNULL_PTR a, const struct LDKCommitmentUpdate *NONNULL_PTR b);
+/* @internal */
+export function CommitmentUpdate_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CommitmentUpdate_eq(a, b);
+       return nativeResponseValue;
 }
        // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
 /* @internal */
@@ -26445,6 +27352,15 @@ export function IgnoringMessageHandler_as_OnionMessageHandler(this_arg: bigint):
        }
        const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_OnionMessageHandler(this_arg);
        return nativeResponseValue;
+}
+       // struct LDKCustomOnionMessageHandler IgnoringMessageHandler_as_CustomOnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+/* @internal */
+export function IgnoringMessageHandler_as_CustomOnionMessageHandler(this_arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomOnionMessageHandler(this_arg);
+       return nativeResponseValue;
 }
        // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
 /* @internal */
@@ -26662,9 +27578,9 @@ export function PeerManager_free(this_obj: bigint): void {
        const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
        // debug statements here
 }
-       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint64_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
+       // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
 /* @internal */
-export function PeerManager_new(message_handler: bigint, our_node_secret: number, current_time: bigint, ephemeral_random_data: number, logger: bigint, custom_message_handler: bigint): bigint {
+export function PeerManager_new(message_handler: bigint, our_node_secret: number, current_time: number, ephemeral_random_data: number, logger: bigint, custom_message_handler: bigint): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
@@ -27030,6 +27946,15 @@ export function TxCreationKeys_new(per_commitment_point_arg: number, revocation_
        }
        const nativeResponseValue = wasm.TS_TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg);
        return nativeResponseValue;
+}
+       // bool TxCreationKeys_eq(const struct LDKTxCreationKeys *NONNULL_PTR a, const struct LDKTxCreationKeys *NONNULL_PTR b);
+/* @internal */
+export function TxCreationKeys_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_TxCreationKeys_eq(a, b);
+       return nativeResponseValue;
 }
        // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
 /* @internal */
@@ -27192,6 +28117,15 @@ export function ChannelPublicKeys_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelPublicKeys_eq(const struct LDKChannelPublicKeys *NONNULL_PTR a, const struct LDKChannelPublicKeys *NONNULL_PTR b);
+/* @internal */
+export function ChannelPublicKeys_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelPublicKeys_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
 /* @internal */
@@ -27363,6 +28297,15 @@ export function HTLCOutputInCommitment_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
        return nativeResponseValue;
+}
+       // bool HTLCOutputInCommitment_eq(const struct LDKHTLCOutputInCommitment *NONNULL_PTR a, const struct LDKHTLCOutputInCommitment *NONNULL_PTR b);
+/* @internal */
+export function HTLCOutputInCommitment_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
 /* @internal */
@@ -27993,6 +28936,15 @@ export function ClosingTransaction_hash(o: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
        return nativeResponseValue;
+}
+       // bool ClosingTransaction_eq(const struct LDKClosingTransaction *NONNULL_PTR a, const struct LDKClosingTransaction *NONNULL_PTR b);
+/* @internal */
+export function ClosingTransaction_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ClosingTransaction_eq(a, b);
+       return nativeResponseValue;
 }
        // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
 /* @internal */
@@ -28434,24 +29386,6 @@ export function ChannelTypeFeatures_free(this_obj: bigint): void {
        }
        const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
        // debug statements here
-}
-       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known_channel_features(void);
-/* @internal */
-export function InitFeatures_known_channel_features(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_InitFeatures_known_channel_features();
-       return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known_channel_features(void);
-/* @internal */
-export function NodeFeatures_known_channel_features(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_NodeFeatures_known_channel_features();
-       return nativeResponseValue;
 }
        // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
 /* @internal */
@@ -28461,15 +29395,6 @@ export function InitFeatures_empty(): bigint {
        }
        const nativeResponseValue = wasm.TS_InitFeatures_empty();
        return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
-/* @internal */
-export function InitFeatures_known(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_InitFeatures_known();
-       return nativeResponseValue;
 }
        // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
 /* @internal */
@@ -28488,15 +29413,6 @@ export function NodeFeatures_empty(): bigint {
        }
        const nativeResponseValue = wasm.TS_NodeFeatures_empty();
        return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
-/* @internal */
-export function NodeFeatures_known(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_NodeFeatures_known();
-       return nativeResponseValue;
 }
        // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
 /* @internal */
@@ -28515,15 +29431,6 @@ export function ChannelFeatures_empty(): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
        return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
-/* @internal */
-export function ChannelFeatures_known(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_ChannelFeatures_known();
-       return nativeResponseValue;
 }
        // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
 /* @internal */
@@ -28542,15 +29449,6 @@ export function InvoiceFeatures_empty(): bigint {
        }
        const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
        return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
-/* @internal */
-export function InvoiceFeatures_known(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
-       return nativeResponseValue;
 }
        // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
 /* @internal */
@@ -28569,15 +29467,6 @@ export function ChannelTypeFeatures_empty(): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
        return nativeResponseValue;
-}
-       // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
-/* @internal */
-export function ChannelTypeFeatures_known(): bigint {
-       if(!isWasmInitialized) {
-               throw new Error("initializeWasm() must be awaited first!");
-       }
-       const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
-       return nativeResponseValue;
 }
        // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
 /* @internal */
@@ -29919,6 +30808,15 @@ export function ShutdownScript_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
        return nativeResponseValue;
+}
+       // bool ShutdownScript_eq(const struct LDKShutdownScript *NONNULL_PTR a, const struct LDKShutdownScript *NONNULL_PTR b);
+/* @internal */
+export function ShutdownScript_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ShutdownScript_eq(a, b);
+       return nativeResponseValue;
 }
        // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
 /* @internal */
@@ -30225,6 +31123,15 @@ export function NetworkUpdate_node_failure(node_id: number, is_permanent: boolea
        }
        const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(node_id, is_permanent);
        return nativeResponseValue;
+}
+       // bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+/* @internal */
+export function NetworkUpdate_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NetworkUpdate_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
 /* @internal */
@@ -30459,6 +31366,15 @@ export function ChannelUpdateInfo_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelUpdateInfo_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+/* @internal */
+export function ChannelUpdateInfo_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelUpdateInfo_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
 /* @internal */
@@ -30630,6 +31546,15 @@ export function ChannelInfo_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
        return nativeResponseValue;
+}
+       // bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+/* @internal */
+export function ChannelInfo_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ChannelInfo_eq(a, b);
+       return nativeResponseValue;
 }
        // MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
 /* @internal */
@@ -31053,6 +31978,15 @@ export function NodeAnnouncementInfo_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
        return nativeResponseValue;
+}
+       // bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+/* @internal */
+export function NodeAnnouncementInfo_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
 /* @internal */
@@ -31125,6 +32059,15 @@ export function NodeAlias_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_NodeAlias_clone(orig);
        return nativeResponseValue;
+}
+       // bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+/* @internal */
+export function NodeAlias_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NodeAlias_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
 /* @internal */
@@ -31233,6 +32176,15 @@ export function NodeInfo_clone(orig: bigint): bigint {
        }
        const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
        return nativeResponseValue;
+}
+       // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+/* @internal */
+export function NodeInfo_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_NodeInfo_eq(a, b);
+       return nativeResponseValue;
 }
        // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
 /* @internal */
@@ -31360,22 +32312,22 @@ export function NetworkGraph_channel_failed(this_arg: bigint, short_channel_id:
        const nativeResponseValue = wasm.TS_NetworkGraph_channel_failed(this_arg, short_channel_id, is_permanent);
        // debug statements here
 }
-       // void NetworkGraph_node_failed(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
+       // void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
 /* @internal */
-export function NetworkGraph_node_failed(this_arg: bigint, _node_id: number, is_permanent: boolean): void {
+export function NetworkGraph_node_failed_permanent(this_arg: bigint, node_id: number): void {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_NetworkGraph_node_failed(this_arg, _node_id, is_permanent);
+       const nativeResponseValue = wasm.TS_NetworkGraph_node_failed_permanent(this_arg, node_id);
        // debug statements here
 }
-       // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+       // void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
 /* @internal */
-export function NetworkGraph_remove_stale_channels_with_time(this_arg: bigint, current_time_unix: bigint): void {
+export function NetworkGraph_remove_stale_channels_and_tracking_with_time(this_arg: bigint, current_time_unix: bigint): void {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
+       const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_and_tracking_with_time(this_arg, current_time_unix);
        // debug statements here
 }
        // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
@@ -32736,6 +33688,60 @@ export function ProbabilisticScoringParameters_set_liquidity_penalty_amount_mult
        }
        const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
        // debug statements here
+}
+       // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr);
+       return nativeResponseValue;
+}
+       // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint, val: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr, val);
+       // debug statements here
+}
+       // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr);
+       return nativeResponseValue;
+}
+       // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint, val: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
+       // debug statements here
+}
+       // uint64_t ProbabilisticScoringParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr);
+       return nativeResponseValue;
+}
+       // void ProbabilisticScoringParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr: bigint, val: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr, val);
+       // debug statements here
 }
        // uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
 /* @internal */
@@ -33069,6 +34075,15 @@ export function SendError_invalid_first_hop(): bigint {
        }
        const nativeResponseValue = wasm.TS_SendError_invalid_first_hop();
        return nativeResponseValue;
+}
+       // struct LDKSendError SendError_invalid_message(void);
+/* @internal */
+export function SendError_invalid_message(): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_SendError_invalid_message();
+       return nativeResponseValue;
 }
        // struct LDKSendError SendError_buffer_full(void);
 /* @internal */
@@ -33079,22 +34094,40 @@ export function SendError_buffer_full(): bigint {
        const nativeResponseValue = wasm.TS_SendError_buffer_full();
        return nativeResponseValue;
 }
-       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger);
+       // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
 /* @internal */
-export function OnionMessenger_new(keys_manager: bigint, logger: bigint): bigint {
+export function SendError_eq(a: bigint, b: bigint): boolean {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_OnionMessenger_new(keys_manager, logger);
+       const nativeResponseValue = wasm.TS_SendError_eq(a, b);
        return nativeResponseValue;
 }
-       // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKBlindedRoute reply_path);
+       // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
 /* @internal */
-export function OnionMessenger_send_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, reply_path: bigint): bigint {
+export function CustomOnionMessageHandler_free(this_ptr: bigint): void {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_OnionMessenger_send_onion_message(this_arg, intermediate_nodes, destination, reply_path);
+       const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_free(this_ptr);
+       // debug statements here
+}
+       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
+/* @internal */
+export function OnionMessenger_new(keys_manager: bigint, logger: bigint, custom_handler: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_OnionMessenger_new(keys_manager, logger, custom_handler);
+       return nativeResponseValue;
+}
+       // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_custom_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKCustomOnionMessageContents msg, struct LDKBlindedRoute reply_path);
+/* @internal */
+export function OnionMessenger_send_custom_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, msg: bigint, reply_path: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_OnionMessenger_send_custom_onion_message(this_arg, intermediate_nodes, destination, msg, reply_path);
        return nativeResponseValue;
 }
        // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
@@ -33114,6 +34147,114 @@ export function OnionMessenger_as_OnionMessageProvider(this_arg: bigint): bigint
        }
        const nativeResponseValue = wasm.TS_OnionMessenger_as_OnionMessageProvider(this_arg);
        return nativeResponseValue;
+}
+       // uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg);
+/* @internal */
+export function CustomOnionMessageContents_clone_ptr(arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone_ptr(arg);
+       return nativeResponseValue;
+}
+       // struct LDKCustomOnionMessageContents CustomOnionMessageContents_clone(const struct LDKCustomOnionMessageContents *NONNULL_PTR orig);
+/* @internal */
+export function CustomOnionMessageContents_clone(orig: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone(orig);
+       return nativeResponseValue;
+}
+       // void CustomOnionMessageContents_free(struct LDKCustomOnionMessageContents this_ptr);
+/* @internal */
+export function CustomOnionMessageContents_free(this_ptr: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_CustomOnionMessageContents_free(this_ptr);
+       // debug statements here
+}
+       // void RapidGossipSync_free(struct LDKRapidGossipSync this_obj);
+/* @internal */
+export function RapidGossipSync_free(this_obj: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_RapidGossipSync_free(this_obj);
+       // debug statements here
+}
+       // MUST_USE_RES struct LDKRapidGossipSync RapidGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph);
+/* @internal */
+export function RapidGossipSync_new(network_graph: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_RapidGossipSync_new(network_graph);
+       return nativeResponseValue;
+}
+       // MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_update_network_graph(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKu8slice update_data);
+/* @internal */
+export function RapidGossipSync_update_network_graph(this_arg: bigint, update_data: number): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_RapidGossipSync_update_network_graph(this_arg, update_data);
+       return nativeResponseValue;
+}
+       // MUST_USE_RES bool RapidGossipSync_is_initial_sync_complete(const struct LDKRapidGossipSync *NONNULL_PTR this_arg);
+/* @internal */
+export function RapidGossipSync_is_initial_sync_complete(this_arg: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_RapidGossipSync_is_initial_sync_complete(this_arg);
+       return nativeResponseValue;
+}
+       // void GraphSyncError_free(struct LDKGraphSyncError this_ptr);
+/* @internal */
+export function GraphSyncError_free(this_ptr: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GraphSyncError_free(this_ptr);
+       // debug statements here
+}
+       // uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg);
+/* @internal */
+export function GraphSyncError_clone_ptr(arg: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GraphSyncError_clone_ptr(arg);
+       return nativeResponseValue;
+}
+       // struct LDKGraphSyncError GraphSyncError_clone(const struct LDKGraphSyncError *NONNULL_PTR orig);
+/* @internal */
+export function GraphSyncError_clone(orig: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GraphSyncError_clone(orig);
+       return nativeResponseValue;
+}
+       // struct LDKGraphSyncError GraphSyncError_decode_error(struct LDKDecodeError a);
+/* @internal */
+export function GraphSyncError_decode_error(a: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GraphSyncError_decode_error(a);
+       return nativeResponseValue;
+}
+       // struct LDKGraphSyncError GraphSyncError_lightning_error(struct LDKLightningError a);
+/* @internal */
+export function GraphSyncError_lightning_error(a: bigint): bigint {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_GraphSyncError_lightning_error(a);
+       return nativeResponseValue;
 }
        // void ParseError_free(struct LDKParseError this_ptr);
 /* @internal */
@@ -33303,6 +34444,15 @@ export function ParseError_skip(): bigint {
        }
        const nativeResponseValue = wasm.TS_ParseError_skip();
        return nativeResponseValue;
+}
+       // bool ParseError_eq(const struct LDKParseError *NONNULL_PTR a, const struct LDKParseError *NONNULL_PTR b);
+/* @internal */
+export function ParseError_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ParseError_eq(a, b);
+       return nativeResponseValue;
 }
        // void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
 /* @internal */
@@ -33348,6 +34498,15 @@ export function ParseOrSemanticError_semantic_error(a: SemanticError): bigint {
        }
        const nativeResponseValue = wasm.TS_ParseOrSemanticError_semantic_error(a);
        return nativeResponseValue;
+}
+       // bool ParseOrSemanticError_eq(const struct LDKParseOrSemanticError *NONNULL_PTR a, const struct LDKParseOrSemanticError *NONNULL_PTR b);
+/* @internal */
+export function ParseOrSemanticError_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_ParseOrSemanticError_eq(a, b);
+       return nativeResponseValue;
 }
        // void Invoice_free(struct LDKInvoice this_obj);
 /* @internal */
@@ -35086,22 +36245,22 @@ export function InFlightHtlcs_read(ser: number): bigint {
        const nativeResponseValue = wasm.TS_InFlightHtlcs_read(ser);
        return nativeResponseValue;
 }
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
 /* @internal */
-export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, network: Currency, amt_msat: bigint, description_hash: bigint, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
+export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, logger: bigint, network: Currency, amt_msat: bigint, description_hash: bigint, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager, keys_manager, network, amt_msat, description_hash, duration_since_epoch, invoice_expiry_delta_secs);
+       const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager, keys_manager, logger, network, amt_msat, description_hash, duration_since_epoch, invoice_expiry_delta_secs);
        return nativeResponseValue;
 }
-       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
+       // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs);
 /* @internal */
-export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
+export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: bigint, keys_manager: bigint, logger: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): bigint {
        if(!isWasmInitialized) {
                throw new Error("initializeWasm() must be awaited first!");
        }
-       const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, keys_manager, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs);
+       const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, keys_manager, logger, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs);
        return nativeResponseValue;
 }
        // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
@@ -35224,12 +36383,12 @@ export function SiPrefix_to_str(o: bigint): number {
 
 
 js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: bigint|number, arg3: bigint|number, arg4: bigint|number, arg5: bigint|number, arg6: bigint|number, arg7: bigint|number, arg8: bigint|number, arg9: bigint|number, arg10: bigint|number) {
-       const weak: WeakRef<object> = js_objs[obj_ptr];
+       const weak: WeakRef<object>|undefined = js_objs[obj_ptr];
        if (weak == null || weak == undefined) {
                console.error("Got function call on unknown/free'd JS object!");
                throw new Error("Got function call on unknown/free'd JS object!");
        }
-       const obj: object = weak.deref();
+       const obj = weak.deref();
        if (obj == null || obj == undefined) {
                console.error("Got function call on GC'd JS object!");
                throw new Error("Got function call on GC'd JS object!");
@@ -35249,110 +36408,116 @@ js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2:
                case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
                case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
                case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
-               case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
-               case 14: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
-               case 15: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
-               case 16: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
-               case 17: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
-               case 18: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
-               case 19: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
-               case 20: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
-               case 21: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
-               case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
-               case 23: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
-               case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
-               case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
-               case 26: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
-               case 27: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
-               case 28: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
-               case 29: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
-               case 30: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
-               case 31: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
-               case 32: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
-               case 33: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
-               case 34: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
-               case 35: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
-               case 36: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
-               case 37: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
-               case 38: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
-               case 39: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
-               case 40: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
-               case 41: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
-               case 42: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
-               case 43: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
-               case 44: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
-               case 45: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
-               case 46: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
-               case 47: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
-               case 48: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
-               case 49: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
-               case 50: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
-               case 51: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
-               case 52: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
-               case 53: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
-               case 54: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
-               case 55: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
-               case 56: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
-               case 57: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
-               case 58: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
-               case 59: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
-               case 60: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
-               case 61: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
-               case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
-               case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
-               case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
-               case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
-               case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
-               case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
-               case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
-               case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
-               case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
-               case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
-               case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
-               case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
-               case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
-               case 75: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
-               case 76: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
-               case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
-               case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
-               case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
-               case 80: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
-               case 81: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
-               case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
-               case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
-               case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
-               case 85: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
-               case 86: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
-               case 87: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
-               case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
-               case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
-               case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
-               case 91: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
-               case 92: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
-               case 93: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
-               case 94: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
-               case 95: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
-               case 96: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
-               case 97: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
-               case 98: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
-               case 99: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
-               case 100: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
-               case 101: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
-               case 102: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
-               case 103: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
-               case 104: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
-               case 105: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
-               case 106: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
-               case 107: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
-               case 108: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
-               case 109: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
-               case 110: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
-               case 111: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
-               case 112: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
-               case 113: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_failed"); break;
-               case 114: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_successful"); break;
-               case 115: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_successful"); break;
-               case 116: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_failed"); break;
+               case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_anchor_input"); break;
+               case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
+               case 15: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
+               case 16: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+               case 17: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
+               case 18: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
+               case 19: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
+               case 20: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
+               case 21: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
+               case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_node_id"); break;
+               case 23: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
+               case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
+               case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
+               case 26: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
+               case 27: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
+               case 28: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
+               case 29: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
+               case 30: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
+               case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
+               case 32: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
+               case 33: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+               case 34: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+               case 35: fn = Object.getOwnPropertyDescriptor(obj, "tlv_type"); break;
+               case 36: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+               case 37: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
+               case 38: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
+               case 39: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
+               case 40: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
+               case 41: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
+               case 42: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
+               case 43: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
+               case 44: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
+               case 45: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
+               case 46: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
+               case 47: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
+               case 48: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+               case 49: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
+               case 50: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+               case 51: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
+               case 52: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
+               case 53: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
+               case 54: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
+               case 55: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
+               case 56: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+               case 57: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+               case 58: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+               case 59: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+               case 60: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+               case 61: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
+               case 62: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
+               case 63: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
+               case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
+               case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+               case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+               case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+               case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
+               case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+               case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+               case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+               case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+               case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+               case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+               case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+               case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+               case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+               case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+               case 79: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+               case 80: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+               case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+               case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+               case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+               case 84: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+               case 85: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+               case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+               case 87: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+               case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+               case 89: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
+               case 90: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
+               case 91: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+               case 92: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+               case 93: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+               case 94: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+               case 95: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+               case 96: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+               case 97: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+               case 98: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
+               case 99: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+               case 100: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+               case 101: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+               case 102: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+               case 103: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+               case 104: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+               case 105: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+               case 106: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+               case 107: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break;
+               case 108: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+               case 109: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+               case 110: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+               case 111: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
+               case 112: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
+               case 113: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
+               case 114: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
+               case 115: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
+               case 116: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
+               case 117: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
+               case 118: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+               case 119: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_failed"); break;
+               case 120: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_path_successful"); break;
+               case 121: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_successful"); break;
+               case 122: fn = Object.getOwnPropertyDescriptor(obj, "notify_payment_probe_failed"); break;
                default:
                        console.error("Got unknown function call from C!");
                        throw new Error("Got unknown function call from C!");
diff --git a/ts/enums/ChannelMonitorUpdateErr.mts b/ts/enums/ChannelMonitorUpdateErr.mts
deleted file mode 100644 (file)
index d521a84..0000000
+++ /dev/null
@@ -1 +0,0 @@
-export { ChannelMonitorUpdateErr } from "../bindings.mjs";
\ No newline at end of file
diff --git a/ts/enums/ChannelMonitorUpdateStatus.mts b/ts/enums/ChannelMonitorUpdateStatus.mts
new file mode 100644 (file)
index 0000000..16762e7
--- /dev/null
@@ -0,0 +1 @@
+export { ChannelMonitorUpdateStatus } from "../bindings.mjs";
\ No newline at end of file
diff --git a/ts/enums/IOError.mts b/ts/enums/IOError.mts
new file mode 100644 (file)
index 0000000..a30bedd
--- /dev/null
@@ -0,0 +1 @@
+export { IOError } from "../bindings.mjs";
\ No newline at end of file
index b8b95e17a10208772e6a97551c7a1b3c320b170f..3cb8a4ee6a374bb11c02108ef6e9d69bbf1f6390 100644 (file)
@@ -12,7 +12,7 @@ export * from './structs/TxOut.mjs';
 export * from './structs/BigEndianScalar.mjs';
 export * from './enums/AccessError.mjs';
 export * from './enums/COption_NoneZ.mjs';
-export * from './enums/ChannelMonitorUpdateErr.mjs';
+export * from './enums/ChannelMonitorUpdateStatus.mjs';
 export * from './enums/ConfirmationTarget.mjs';
 export * from './enums/CreationError.mjs';
 export * from './enums/Currency.mjs';
@@ -119,7 +119,6 @@ export * from './structs/GossipTimestampFilter.mjs';
 export * from './structs/MessageSendEvent.mjs';
 export * from './structs/Result_TxOutAccessErrorZ.mjs';
 export * from './structs/TwoTuple_usizeTransactionZ.mjs';
-export * from './structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 export * from './structs/HTLCUpdate.mjs';
 export * from './structs/MonitorEvent.mjs';
 export * from './structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -175,6 +174,7 @@ export * from './structs/Result_SignatureNoneZ.mjs';
 export * from './structs/TwoTuple_SignatureSignatureZ.mjs';
 export * from './structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 export * from './structs/Result_SecretKeyNoneZ.mjs';
+export * from './structs/Result_PublicKeyNoneZ.mjs';
 export * from './structs/Option_ScalarZ.mjs';
 export * from './structs/Result_SharedSecretNoneZ.mjs';
 export * from './structs/ClosingTransaction.mjs';
@@ -262,6 +262,9 @@ export * from './structs/Balance.mjs';
 export * from './structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 export * from './structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 export * from './structs/TwoTuple_PublicKeyTypeZ.mjs';
+export * from './structs/CustomOnionMessageContents.mjs';
+export * from './structs/Option_CustomOnionMessageContentsZ.mjs';
+export * from './structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 export * from './structs/Option_NetAddressZ.mjs';
 export * from './structs/PeerHandleError.mjs';
 export * from './structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -269,6 +272,8 @@ export * from './structs/Result_NonePeerHandleErrorZ.mjs';
 export * from './structs/Result_boolPeerHandleErrorZ.mjs';
 export * from './structs/SendError.mjs';
 export * from './structs/Result_NoneSendErrorZ.mjs';
+export * from './structs/GraphSyncError.mjs';
+export * from './structs/Result_u32GraphSyncErrorZ.mjs';
 export * from './structs/Result_NoneErrorZ.mjs';
 export * from './structs/Result_NetAddressDecodeErrorZ.mjs';
 export * from './structs/UpdateAddHTLC.mjs';
@@ -360,6 +365,7 @@ export * from './structs/OnionMessageHandler.mjs';
 export * from './structs/CustomMessageReader.mjs';
 export * from './structs/CustomMessageHandler.mjs';
 export * from './structs/IgnoringMessageHandler.mjs';
+export * from './structs/CustomOnionMessageHandler.mjs';
 export * from './structs/ErroringMessageHandler.mjs';
 export * from './structs/MessageHandler.mjs';
 export * from './structs/SocketDescriptor.mjs';
@@ -374,6 +380,7 @@ export * from './structs/MultiThreadedScoreLock.mjs';
 export * from './structs/ProbabilisticScoringParameters.mjs';
 export * from './structs/OnionMessenger.mjs';
 export * from './structs/Destination.mjs';
+export * from './structs/RapidGossipSync.mjs';
 export * from './structs/RawDataPart.mjs';
 export * from './structs/Sha256.mjs';
 export * from './structs/ExpiryTime.mjs';
index f3ac4bd5f98c33fbd0414417331fecb6b416f375..099d2b6345e1ea2c013210b713740801acd52ab1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -382,7 +389,7 @@ import * as bindings from '../bindings.mjs'
  * too-high values)
  */
 export class APIError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.APIError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.APIError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): APIError {
                const raw_ty: number = bindings.LDKAPIError_ty_from_ptr(ptr);
@@ -391,7 +398,7 @@ export class APIError extends CommonBase {
                        case 1: return new APIError_FeeRateTooHigh(ptr);
                        case 2: return new APIError_RouteError(ptr);
                        case 3: return new APIError_ChannelUnavailable(ptr);
-                       case 4: return new APIError_MonitorUpdateFailed(ptr);
+                       case 4: return new APIError_MonitorUpdateInProgress(ptr);
                        case 5: return new APIError_IncompatibleShutdownScript(ptr);
                        default:
                                throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
@@ -454,10 +461,10 @@ export class APIError extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new MonitorUpdateFailed-variant APIError
+        * Utility method to constructs a new MonitorUpdateInProgress-variant APIError
         */
-       public static constructor_monitor_update_failed(): APIError {
-               const ret: bigint = bindings.APIError_monitor_update_failed();
+       public static constructor_monitor_update_in_progress(): APIError {
+               const ret: bigint = bindings.APIError_monitor_update_in_progress();
                const ret_hu_conv: APIError = APIError.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                return ret_hu_conv;
@@ -474,6 +481,15 @@ export class APIError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two APIErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: APIError): boolean {
+               const ret: boolean = bindings.APIError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
 }
 /** A APIError of type APIMisuseError */
 export class APIError_APIMisuseError extends APIError {
@@ -536,8 +552,8 @@ export class APIError_ChannelUnavailable extends APIError {
                this.err = err_conv;
        }
 }
-/** A APIError of type MonitorUpdateFailed */
-export class APIError_MonitorUpdateFailed extends APIError {
+/** A APIError of type MonitorUpdateInProgress */
+export class APIError_MonitorUpdateInProgress extends APIError {
        /* @internal */
        public constructor(ptr: bigint) {
                super(null, ptr);
index f2ceb6ff58e97f9bd20a74a0223886b4bf7d5bbd..8af94449f3b2c52fd6cb7534f378a8d30f910f7b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class AcceptChannel extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.AcceptChannel_free);
        }
 
@@ -629,7 +636,7 @@ export class AcceptChannel extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_channel_type(val: ChannelTypeFeatures): void {
+       public set_channel_type(val: ChannelTypeFeatures|null): void {
                bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -649,6 +656,17 @@ export class AcceptChannel extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two AcceptChannels contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: AcceptChannel): boolean {
+               const ret: boolean = bindings.AcceptChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
         */
index 1b1936ca06a717bd517817d33a16cea23ace37b2..94aaa19d40035f867f8927307f85f0d69db5e201 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -392,7 +399,7 @@ export interface AccessInterface {
 }
 
 class LDKAccessHolder {
-       held: Access;
+       held: Access|null = null;
 }
 
 /**
@@ -401,13 +408,13 @@ class LDKAccessHolder {
  */
 export class Access extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKAccess;
+       public bindings_instance: bindings.LDKAccess|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Access_free);
                this.bindings_instance = null;
        }
@@ -428,7 +435,7 @@ export class Access extends CommonBase {
                impl_holder.held = new Access(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 6c899e5ee72ef076d38427ba7542a4678fc1c20e..58ce9490ef07cf9f5fea6522c15278762ae75873 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class AnnouncementSignatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.AnnouncementSignatures_free);
        }
 
@@ -475,6 +482,17 @@ export class AnnouncementSignatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two AnnouncementSignaturess contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: AnnouncementSignatures): boolean {
+               const ret: boolean = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the AnnouncementSignatures object into a byte array which can be read by AnnouncementSignatures_read
         */
index db6753743745b94ee395cbbfc0f684a5f12eebd2..8545a648eb46a1437c34bf7aac1278115ac63047 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidC
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  * be provided.
  */
 export class Balance extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Balance_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Balance_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Balance {
                const raw_ty: number = bindings.LDKBalance_ty_from_ptr(ptr);
index 792e8b1afde36b8a89ad0eed95fd2c273fc8ddd1..adfc3566e1b8e321e21b58b1317e7bee10b5f696 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -511,6 +518,10 @@ export interface BaseSignInterface {
         * chosen to forgo their output as dust.
         */
        sign_closing_transaction(closing_tx: ClosingTransaction): Result_SignatureNoneZ;
+       /**Computes the signature for a commitment transaction's anchor output used as an
+        * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+        */
+       sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_SignatureNoneZ;
        /**Signs a channel announcement message with our funding key and our node secret key (aka
         * node_id or network_key), proving it comes from one of the channel participants.
         * 
@@ -537,7 +548,7 @@ export interface BaseSignInterface {
 }
 
 class LDKBaseSignHolder {
-       held: BaseSign;
+       held: BaseSign|null = null;
 }
 
 /**
@@ -561,13 +572,13 @@ class LDKBaseSignHolder {
  */
 export class BaseSign extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKBaseSign;
+       public bindings_instance: bindings.LDKBaseSign|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BaseSign_free);
                this.bindings_instance = null;
        }
@@ -660,6 +671,12 @@ export class BaseSign extends CommonBase {
                                const result: bigint = ret == null ? 0n : ret.clone_ptr();
                                return result;
                        },
+                       sign_holder_anchor_input (anchor_tx: number, input: number): bigint {
+                               const anchor_tx_conv: Uint8Array = bindings.decodeUint8Array(anchor_tx);
+                               const ret: Result_SignatureNoneZ = arg.sign_holder_anchor_input(anchor_tx_conv, input);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
+                       },
                        sign_channel_announcement (msg: bigint): bigint {
                                const msg_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, msg);
                                const ret: Result_C2Tuple_SignatureSignatureZNoneZ = arg.sign_channel_announcement(msg_hu_conv);
@@ -676,7 +693,7 @@ export class BaseSign extends CommonBase {
                impl_holder.held = new BaseSign(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -880,6 +897,16 @@ export class BaseSign extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Computes the signature for a commitment transaction's anchor output used as an
+        * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+        */
+       public sign_holder_anchor_input(anchor_tx: Uint8Array, input: number): Result_SignatureNoneZ {
+               const ret: bigint = bindings.BaseSign_sign_holder_anchor_input(this.ptr, bindings.encodeUint8Array(anchor_tx), input);
+               const ret_hu_conv: Result_SignatureNoneZ = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Signs a channel announcement message with our funding key and our node secret key (aka
         * node_id or network_key), proving it comes from one of the channel participants.
index 5a165fd118fb78a79fa1e225347d40029dbfa6f1..7f62ddacca7b5fb28eb195b9fff5b63687ca1869 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * Represents an error returned from the bech32 library during validation of some bech32 data
  */
 export class Bech32Error extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Bech32Error_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Bech32Error_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Bech32Error {
                const raw_ty: number = bindings.LDKBech32Error_ty_from_ptr(ptr);
index e5d5454ed9e33ac8eab0c2e3ae67aa50cbde7903..f7076ad3a22834fc57e3e6887337f59d29ba7987 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class BestBlock extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BestBlock_free);
        }
 
@@ -402,6 +409,17 @@ export class BestBlock extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two BestBlocks contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: BestBlock): boolean {
+               const ret: boolean = bindings.BestBlock_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Constructs a `BestBlock` that represents the genesis block at height 0 of the given
         * network.
index 6f14466c8792798228fe097ca6348f6b2c400fef..5d335749035c01dbacb1005aaac564cd1e116c57 100644 (file)
@@ -1,7 +1,7 @@
 import { TxOut } from '../structs/TxOut.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -382,7 +389,7 @@ export class BigEndianScalar extends CommonBase {
        public scalar_bytes: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BigEndianScalar_free);
                this.scalar_bytes = bindings.decodeUint8Array(bindings.BigEndianScalar_get_bytes(ptr));
        }
index 73a24fff3f9dfab9c2c37e9b5680ddf125fca8a0..183f18bf10a6688aa6e373932016b3ace3807b14 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -389,7 +396,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class BigSize extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BigSize_free);
        }
 
index 44ede1b9a43ad0d889f367bb08efe8cba1c2ddf1..154eac623b89b26614d0a8e70001117b695a6dfc 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class BlindedHop extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BlindedHop_free);
        }
 
index 46812a78c139210d1906fbadf6612823fc2346f1..c6e2c7e9a727c676024cdc77342fe4b77a1b7b05 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class BlindedRoute extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BlindedRoute_free);
        }
 
index 1e0e977842dd90acb74e6ad61ac7b8d7148cef5d..c0fa18514f4b1d2e19543a702df8de5e1ab3424c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface BroadcasterInterfaceInterface {
 }
 
 class LDKBroadcasterInterfaceHolder {
-       held: BroadcasterInterface;
+       held: BroadcasterInterface|null = null;
 }
 
 /**
@@ -396,13 +403,13 @@ class LDKBroadcasterInterfaceHolder {
  */
 export class BroadcasterInterface extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKBroadcasterInterface;
+       public bindings_instance: bindings.LDKBroadcasterInterface|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BroadcasterInterface_free);
                this.bindings_instance = null;
        }
@@ -421,7 +428,7 @@ export class BroadcasterInterface extends CommonBase {
                impl_holder.held = new BroadcasterInterface(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 925563920c61acbeea036dc29c85f4b0dc8b7b18..adc558e406e108cf5b0599fe3910b968f2d361a2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class BuiltCommitmentTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BuiltCommitmentTransaction_free);
        }
 
index e2628a9b0b5c149d583ee2618f131b55a6222e5e..61b1b67498cb4f8de4bafe55f17b5a6d1a98bf11 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -391,7 +398,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChainMonitor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChainMonitor_free);
        }
 
@@ -478,12 +485,12 @@ export class ChainMonitor extends CommonBase {
 
        /**
         * Indicates the persistence of a [`ChannelMonitor`] has completed after
-        * [`ChannelMonitorUpdateErr::TemporaryFailure`] was returned from an update operation.
+        * [`ChannelMonitorUpdateStatus::InProgress`] was returned from an update operation.
         * 
         * Thus, the anticipated use is, at a high level:
         * 1) This [`ChainMonitor`] calls [`Persist::update_persisted_channel`] which stores the
         * update to disk and begins updating any remote (e.g. watchtower/backup) copies,
-        * returning [`ChannelMonitorUpdateErr::TemporaryFailure`],
+        * returning [`ChannelMonitorUpdateStatus::InProgress`],
         * 2) once all remote copies are updated, you call this function with the
         * `completed_update_id` that completed, and once all pending updates have completed the
         * channel will be re-enabled.
index b3602419f75442517a0d01e8751dcf494883e47b..ebd315c0fe1a1df9c4896560d7c365d464ab02f9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChainParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChainParameters_free);
        }
 
index a4bbfac41ac5c230feadce610bee8ee87949334c..b5675040129ee258013bfd72a9f865f863a65ba4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelAnnouncement extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelAnnouncement_free);
        }
 
@@ -495,6 +502,17 @@ export class ChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelAnnouncement): boolean {
+               const ret: boolean = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelAnnouncement object into a byte array which can be read by ChannelAnnouncement_read
         */
index 619bba2f3f696dbcc9066beed422386d1bf47321..0ddb059e051003c71292896da2eb152c2430d679 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelConfig extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelConfig_free);
        }
 
@@ -511,6 +518,12 @@ export class ChannelConfig extends CommonBase {
         * to such payments may be sustantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
+        * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+        * channel negotiated throughout the channel open process, along with the fees required to have
+        * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+        * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+        * account the HTLC transaction fee as it is zero.
+        * 
         * This limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel. Setting this too low may prevent the
         * sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
@@ -533,6 +546,12 @@ export class ChannelConfig extends CommonBase {
         * to such payments may be sustantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
+        * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
+        * channel negotiated throughout the channel open process, along with the fees required to have
+        * a broadcastable HTLC spending transaction. When a channel supports anchor outputs
+        * (specifically the zero fee HTLC transaction variant), this threshold no longer takes into
+        * account the HTLC transaction fee as it is zero.
+        * 
         * This limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel. Setting this too low may prevent the
         * sending or receipt of low-value HTLCs on high-traffic nodes, and this limit is very
@@ -626,6 +645,17 @@ export class ChannelConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelConfigs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelConfig): boolean {
+               const ret: boolean = bindings.ChannelConfig_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Creates a "default" ChannelConfig. See struct and individual field documentaiton for details on which values are used.
         */
index 8df3b65d6d9efb8b06c87be46fc8b42d6aaa988d..d1e85efcb2e4717aa239adfaf99cf0536e07f717 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelCounterparty extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelCounterparty_free);
        }
 
@@ -472,7 +479,7 @@ export class ChannelCounterparty extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_forwarding_info(val: CounterpartyForwardingInfo): void {
+       public set_forwarding_info(val: CounterpartyForwardingInfo|null): void {
                bindings.ChannelCounterparty_set_forwarding_info(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
index a5baff81937202561d524263d3abf735f481cda0..898bb38b0c07d851a7a9c03ce75934483fd179ce 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelDetails extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelDetails_free);
        }
 
@@ -452,7 +459,7 @@ export class ChannelDetails extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_funding_txo(val: OutPoint): void {
+       public set_funding_txo(val: OutPoint|null): void {
                bindings.ChannelDetails_set_funding_txo(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -478,7 +485,7 @@ export class ChannelDetails extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_channel_type(val: ChannelTypeFeatures): void {
+       public set_channel_type(val: ChannelTypeFeatures|null): void {
                bindings.ChannelDetails_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -978,7 +985,7 @@ export class ChannelDetails extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_config(val: ChannelConfig): void {
+       public set_config(val: ChannelConfig|null): void {
                bindings.ChannelDetails_set_config(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
index 2eaae8f4e9336888c7c97d5486fbba41a838d206..8d177caabb798df50c2d3716dbf4a2fe97a3cd83 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelFeatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelFeatures_free);
        }
 
@@ -423,16 +430,6 @@ export class ChannelFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static constructor_known(): ChannelFeatures {
-               const ret: bigint = bindings.ChannelFeatures_known();
-               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index 9e0d9da0d57565cd8548240f595e4ea9611c8f5c..da634cfd291d90130cd91b695f404be8bd1635bf 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelHandshakeConfig extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelHandshakeConfig_free);
        }
 
index 0b230e5b300b556db84b371c0e12db33dbc5cfbc..ffa048b862b57055c7f8383cea580acae949e50a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -393,7 +400,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelHandshakeLimits extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelHandshakeLimits_free);
        }
 
index 74ff063fe1aa76db537af165b36f4e12cf929548..9dd0565cc575e41068b4d228ec96919a6b2d3f15 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelInfo_free);
        }
 
@@ -441,7 +448,7 @@ export class ChannelInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_one_to_two(val: ChannelUpdateInfo): void {
+       public set_one_to_two(val: ChannelUpdateInfo|null): void {
                bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -481,7 +488,7 @@ export class ChannelInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_two_to_one(val: ChannelUpdateInfo): void {
+       public set_two_to_one(val: ChannelUpdateInfo|null): void {
                bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -526,7 +533,7 @@ export class ChannelInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_announcement_message(val: ChannelAnnouncement): void {
+       public set_announcement_message(val: ChannelAnnouncement|null): void {
                bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -546,6 +553,17 @@ export class ChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelInfo): boolean {
+               const ret: boolean = bindings.ChannelInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
         * 
index 19c355baf5effb98cbf8df61a7e4501e9717ea11..64ec6770fb60c591a26debb10395f13ee04055be 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -418,7 +425,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelManager extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelManager_free);
        }
 
@@ -488,7 +495,7 @@ export class ChannelManager extends CommonBase {
         * 
         * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, override_config: UserConfig): Result__u832APIErrorZ {
+       public create_channel(their_network_key: Uint8Array, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, override_config: UserConfig|null): Result__u832APIErrorZ {
                const ret: bigint = bindings.ChannelManager_create_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_network_key, 33)), channel_value_satoshis, push_msat, user_channel_id, override_config == null ? 0n : CommonBase.get_ptr_of(override_config));
                const ret_hu_conv: Result__u832APIErrorZ = Result__u832APIErrorZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, override_config);
@@ -651,12 +658,12 @@ export class ChannelManager extends CommonBase {
         * PaymentSendFailure for more info.
         * 
         * In general, a path may raise:
-        * APIError::RouteError when an invalid route or forwarding parameter (cltv_delta, fee,
+        * [`APIError::RouteError`] when an invalid route or forwarding parameter (cltv_delta, fee,
         * node public key) is specified.
-        * APIError::ChannelUnavailable if the next-hop channel is not available for updates
+        * [`APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
         * (including due to previous monitor update failure or new permanent monitor update
         * failure).
-        * APIError::MonitorUpdateFailed if a new monitor update failure prevented sending the
+        * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
         * relevant updates.
         * 
         * Note that depending on the type of the PaymentSendFailure the HTLC may have been
@@ -674,7 +681,7 @@ export class ChannelManager extends CommonBase {
         * 
         * Note that payment_secret (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array): Result_PaymentIdPaymentSendFailureZ {
+       public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array|null): Result_PaymentIdPaymentSendFailureZ {
                const ret: bigint = bindings.ChannelManager_send_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)));
                const ret_hu_conv: Result_PaymentIdPaymentSendFailureZ = Result_PaymentIdPaymentSendFailureZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, route);
@@ -738,7 +745,7 @@ export class ChannelManager extends CommonBase {
         * 
         * Note that payment_preimage (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public send_spontaneous_payment(route: Route, payment_preimage: Uint8Array): Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
+       public send_spontaneous_payment(route: Route, payment_preimage: Uint8Array|null): Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
                const ret: bigint = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage, 32)));
                const ret_hu_conv: Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ = Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, route);
index 5c561b9b6f9df92f1a2d9150a9a9fb647b793661..90513fbcaeab9ebf2f4adc4eb671a25ec980dbc3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -414,7 +421,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelManagerReadArgs extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelManagerReadArgs_free);
        }
 
index 17a0b206763dc1436482e8c7a799016ab03dd28c..a838cccf8cbb234cd9d61415712f7a54cc42141d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -431,11 +438,18 @@ export interface ChannelMessageHandlerInterface {
         * is believed to be possible in the future (eg they're sending us messages we don't
         * understand or indicate they require unknown feature bits), no_connection_possible is set
         * and any outstanding channels should be failed.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void;
        /**Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       peer_connected(their_node_id: Uint8Array, msg: Init): void;
+       peer_connected(their_node_id: Uint8Array, msg: Init): Result_NoneNoneZ;
        /**Handle an incoming channel_reestablish message from the given peer.
         */
        handle_channel_reestablish(their_node_id: Uint8Array, msg: ChannelReestablish): void;
@@ -460,7 +474,7 @@ export interface ChannelMessageHandlerInterface {
 }
 
 class LDKChannelMessageHandlerHolder {
-       held: ChannelMessageHandler;
+       held: ChannelMessageHandler|null = null;
 }
 
 /**
@@ -471,13 +485,13 @@ class LDKChannelMessageHandlerHolder {
  */
 export class ChannelMessageHandler extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKChannelMessageHandler;
+       public bindings_instance: bindings.LDKChannelMessageHandler|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelMessageHandler_free);
                this.bindings_instance = null;
        }
@@ -570,10 +584,12 @@ export class ChannelMessageHandler extends CommonBase {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
                                arg.peer_disconnected(their_node_id_conv, no_connection_possible);
                        },
-                       peer_connected (their_node_id: number, msg: bigint): void {
+                       peer_connected (their_node_id: number, msg: bigint): bigint {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
                                const msg_hu_conv: Init = new Init(null, msg);
-                               arg.peer_connected(their_node_id_conv, msg_hu_conv);
+                               const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, msg_hu_conv);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
                        },
                        handle_channel_reestablish (their_node_id: number, msg: bigint): void {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
@@ -603,13 +619,13 @@ export class ChannelMessageHandler extends CommonBase {
                        },
                } as bindings.LDKChannelMessageHandler;
                const messageSendEventsProvider = MessageSendEventsProvider.new_impl(messageSendEventsProvider_impl, );
-               const ptr_idx: [bigint, number] = bindings.LDKChannelMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx);
+               const ptr_idx: [bigint, number] = bindings.LDKChannelMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx!);
 
                impl_holder.held = new ChannelMessageHandler(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(messageSendEventsProvider);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -740,6 +756,9 @@ export class ChannelMessageHandler extends CommonBase {
         * is believed to be possible in the future (eg they're sending us messages we don't
         * understand or indicate they require unknown feature bits), no_connection_possible is set
         * and any outstanding channels should be failed.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        public peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void {
                bindings.ChannelMessageHandler_peer_disconnected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), no_connection_possible);
@@ -747,10 +766,16 @@ export class ChannelMessageHandler extends CommonBase {
 
        /**
         * Handle a peer reconnecting, possibly generating channel_reestablish message(s).
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public peer_connected(their_node_id: Uint8Array, msg: Init): void {
-               bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
+       public peer_connected(their_node_id: Uint8Array, msg: Init): Result_NoneNoneZ {
+               const ret: bigint = bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
+               const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, msg);
+               return ret_hu_conv;
        }
 
        /**
index cd74b41101cd4a2c11a6be53d3ab02d593828f57..5b27e5a7d4976bf8231ebae1e71453f136fd3335 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -398,7 +405,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelMonitor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelMonitor_free);
        }
 
@@ -545,14 +552,20 @@ export class ChannelMonitor extends CommonBase {
 
        /**
         * Used by ChannelManager deserialization to broadcast the latest holder state if its copy of
-        * the Channel was out-of-date. You may use it to get a broadcastable holder toxic tx in case of
-        * fallen-behind, i.e when receiving a channel_reestablish with a proof that our counterparty side knows
-        * a higher revocation secret than the holder commitment number we are aware of. Broadcasting these
-        * transactions are UNSAFE, as they allow counterparty side to punish you. Nevertheless you may want to
-        * broadcast them if counterparty don't close channel with his higher commitment transaction after a
-        * substantial amount of time (a month or even a year) to get back funds. Best may be to contact
-        * out-of-band the other node operator to coordinate with him if option is available to you.
-        * In any-case, choice is up to the user.
+        * the Channel was out-of-date.
+        * 
+        * You may also use this to broadcast the latest local commitment transaction, either because
+        * a monitor update failed with [`ChannelMonitorUpdateStatus::PermanentFailure`] or because we've
+        * fallen behind (i.e. we've received proof that our counterparty side knows a revocation
+        * secret we gave them that they shouldn't know).
+        * 
+        * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+        * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
+        * close channel with their commitment transaction after a substantial amount of time. Best
+        * may be to contact the other node operator out-of-band to coordinate other options available
+        * to you. In any-case, the choice is up to you.
+        * 
+        * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
         */
        public get_latest_holder_commitment_txn(logger: Logger): Uint8Array[] {
                const ret: number = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger == null ? 0n : CommonBase.get_ptr_of(logger));
index 280ea1f885ec3e3bf69ba7c8eb460b53647a60b6..c82dd2da96635046310d258f88c6a93cdd2fc720 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -389,7 +396,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelMonitorUpdate extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelMonitorUpdate_free);
        }
 
@@ -399,12 +406,14 @@ export class ChannelMonitorUpdate extends CommonBase {
         * increasing and increase by one for each new update, with one exception specified below.
         * 
         * This sequence number is also used to track up to which points updates which returned
-        * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+        * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
         * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
         * 
         * The only instance where update_id values are not strictly increasing is the case where we
         * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
         * its docs for more details.
+        * 
+        * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
         */
        public get_update_id(): bigint {
                const ret: bigint = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
@@ -417,12 +426,14 @@ export class ChannelMonitorUpdate extends CommonBase {
         * increasing and increase by one for each new update, with one exception specified below.
         * 
         * This sequence number is also used to track up to which points updates which returned
-        * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
+        * [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
         * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
         * 
         * The only instance where update_id values are not strictly increasing is the case where we
         * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
         * its docs for more details.
+        * 
+        * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
         */
        public set_update_id(val: bigint): void {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
index e8ec26dae96c258e9fc244af17f89a2f16ee9e74..15ecb79b5d0d5884fb2c73eb4d752240531e73b5 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelPublicKeys extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelPublicKeys_free);
        }
 
@@ -510,6 +517,17 @@ export class ChannelPublicKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelPublicKeyss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelPublicKeys): boolean {
+               const ret: boolean = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read
         */
index f1657b4e638ddaed28342b58d80ae2edd7d4c0a8..b3fb1cc5a196d92055097fb180faf5de7cf6d14d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelReady extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelReady_free);
        }
 
@@ -463,6 +470,17 @@ export class ChannelReady extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelReadys contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelReady): boolean {
+               const ret: boolean = bindings.ChannelReady_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelReady object into a byte array which can be read by ChannelReady_read
         */
index 77bab400d49b1beeebccee140f9c15a33a370d55..2e05d90b997fca9365ccd9b3c0a05d94acaf9061 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelReestablish extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelReestablish_free);
        }
 
@@ -448,6 +455,17 @@ export class ChannelReestablish extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelReestablishs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelReestablish): boolean {
+               const ret: boolean = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelReestablish object into a byte array which can be read by ChannelReestablish_read
         */
index 80c4a90809a3f7bae34e41e89c5f37ad458b4d84..e2f5ac2c9842bc89d06721b94864dd657076375c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelTransactionParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelTransactionParameters_free);
        }
 
@@ -460,7 +467,7 @@ export class ChannelTransactionParameters extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_counterparty_parameters(val: CounterpartyChannelTransactionParameters): void {
+       public set_counterparty_parameters(val: CounterpartyChannelTransactionParameters|null): void {
                bindings.ChannelTransactionParameters_set_counterparty_parameters(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -482,13 +489,14 @@ export class ChannelTransactionParameters extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_funding_outpoint(val: OutPoint): void {
+       public set_funding_outpoint(val: OutPoint|null): void {
                bindings.ChannelTransactionParameters_set_funding_outpoint(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
 
        /**
-        * Are anchors used for this channel.  Boolean is serialization backwards-compatible
+        * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+        * serialization backwards-compatible.
         */
        public get_opt_anchors(): COption_NoneZ {
                const ret: COption_NoneZ = bindings.ChannelTransactionParameters_get_opt_anchors(this.ptr);
@@ -496,7 +504,8 @@ export class ChannelTransactionParameters extends CommonBase {
        }
 
        /**
-        * Are anchors used for this channel.  Boolean is serialization backwards-compatible
+        * Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is
+        * serialization backwards-compatible.
         */
        public set_opt_anchors(val: COption_NoneZ): void {
                bindings.ChannelTransactionParameters_set_opt_anchors(this.ptr, val);
index 11689964fc961fb359485840fa14ce79194ecc80..6e802bf421bb4cbc541821a091284ec12f389839 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -392,7 +399,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelTypeFeatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelTypeFeatures_free);
        }
 
@@ -432,16 +439,6 @@ export class ChannelTypeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static constructor_known(): ChannelTypeFeatures {
-               const ret: bigint = bindings.ChannelTypeFeatures_known();
-               const ret_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index aa0485d6621973bd72f66ea135e1ee4a59714593..bcc0b2d87650d5afd7f8c37a040fdd521371a076 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelUpdate extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelUpdate_free);
        }
 
@@ -447,6 +454,17 @@ export class ChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelUpdate): boolean {
+               const ret: boolean = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelUpdate object into a byte array which can be read by ChannelUpdate_read
         */
index 80f88b41c1f8149fbce0586870448c2f1965df33..c72a0278fd87da567b8a6f2ebc9ba05db93a9cef 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelUpdateInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelUpdateInfo_free);
        }
 
@@ -505,7 +512,7 @@ export class ChannelUpdateInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_last_update_message(val: ChannelUpdate): void {
+       public set_last_update_message(val: ChannelUpdate|null): void {
                bindings.ChannelUpdateInfo_set_last_update_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -537,6 +544,17 @@ export class ChannelUpdateInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ChannelUpdateInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ChannelUpdateInfo): boolean {
+               const ret: boolean = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
         */
index 2a5f0a5800952602fa252131daf70588528c7b73..38e80ab44d08d748276a26c723ef1c4572c786d6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ChannelUsage extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ChannelUsage_free);
        }
 
index 48f44e2ae8051ebe6b5e33e180f888f7ac8ceb8f..fdeeb3dea695bc90a4a24df121aeb018f1369cae 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ClosingSigned extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ClosingSigned_free);
        }
 
@@ -453,7 +460,7 @@ export class ClosingSigned extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_fee_range(val: ClosingSignedFeeRange): void {
+       public set_fee_range(val: ClosingSignedFeeRange|null): void {
                bindings.ClosingSigned_set_fee_range(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -484,6 +491,17 @@ export class ClosingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosingSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ClosingSigned): boolean {
+               const ret: boolean = bindings.ClosingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ClosingSigned object into a byte array which can be read by ClosingSigned_read
         */
index bb4d04e245f93ca2915d7b47d9435f3345a1690b..4161c32c7fcae37a05e45ea271c3dd16ec335bcd 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ClosingSignedFeeRange extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ClosingSignedFeeRange_free);
        }
 
@@ -448,6 +455,17 @@ export class ClosingSignedFeeRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosingSignedFeeRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ClosingSignedFeeRange): boolean {
+               const ret: boolean = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read
         */
index 8e4032d075c4039230edee2fa4927a82458f13b2..10284f1bc4ace89b220b5e48fb0d840560a5627d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ClosingTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ClosingTransaction_free);
        }
 
@@ -414,6 +421,17 @@ export class ClosingTransaction extends CommonBase {
                return ret;
        }
 
+       /**
+        * Checks if two ClosingTransactions contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ClosingTransaction): boolean {
+               const ret: boolean = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Construct an object of the class
         */
index 4727d8f935e8d44717e801260cc385e479f1202d..b0772f0d273df482007298956cad145cdd5def40 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * The reason the channel was closed. See individual variants more details.
  */
 export class ClosureReason extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ClosureReason_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ClosureReason_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): ClosureReason {
                const raw_ty: number = bindings.LDKClosureReason_ty_from_ptr(ptr);
@@ -494,6 +501,15 @@ export class ClosureReason extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ClosureReasons contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: ClosureReason): boolean {
+               const ret: boolean = bindings.ClosureReason_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
         */
index 4e3995ed0880af747a991f3ca706e73f98b02f16..a7d5644e863dc14014ea4ac8ed6c7a17cc4a6bf6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CommitmentSigned extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CommitmentSigned_free);
        }
 
@@ -469,6 +476,17 @@ export class CommitmentSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two CommitmentSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: CommitmentSigned): boolean {
+               const ret: boolean = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the CommitmentSigned object into a byte array which can be read by CommitmentSigned_read
         */
index c204cebf8be4d27fee9a8d49d8148fcfe0637ca4..69d1beebdfe9fe8003da73ad8a046b4bc5cd820f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CommitmentTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CommitmentTransaction_free);
        }
 
index 89c774936366c90e012102edf76f308d0b92243b..a5023a13bd02971af57fa6efc1afb05dc533f5df 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CommitmentUpdate extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CommitmentUpdate_free);
        }
 
@@ -505,7 +512,7 @@ export class CommitmentUpdate extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_update_fee(val: UpdateFee): void {
+       public set_update_fee(val: UpdateFee|null): void {
                bindings.CommitmentUpdate_set_update_fee(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -559,4 +566,15 @@ export class CommitmentUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two CommitmentUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: CommitmentUpdate): boolean {
+               const ret: boolean = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
 }
index 4cd47fd795598f4ca799183501b6daff8a78ae38..5361d4f65dc717b2ba800cdf2b1e907dc22ab654 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -395,8 +402,8 @@ export class CommonBase {
        // In Java, protected means "any subclass can access fields on any other subclass'"
        // In TypeScript, protected means "any subclass can access parent fields on instances of itself"
        // To work around this, we add accessors for other instances' protected fields here.
-       protected static add_ref_from(holder: CommonBase, referent: object) {
-               if (holder !== null) { holder.ptrs_to.push(referent); }
+       protected static add_ref_from(holder: CommonBase|null, referent: object|null) {
+               if (holder !== null && referent !== null) { holder.ptrs_to.push(referent); }
        }
        protected static get_ptr_of(o: CommonBase) {
                return o.ptr;
@@ -429,5 +436,5 @@ export class WitnessVersion {
 }
 
 export class UnqualifiedError {
-       public constructor(val: number) {}
+       public constructor(_val: number) {}
 }
index 6f9e0e0045da38579b63f62d3afdaabe38228e55..3cee8d0601e83a49a84078904ee642bf7eded5f9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -431,7 +438,7 @@ export interface ConfirmInterface {
 }
 
 class LDKConfirmHolder {
-       held: Confirm;
+       held: Confirm|null = null;
 }
 
 /**
@@ -470,13 +477,13 @@ class LDKConfirmHolder {
  */
 export class Confirm extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKConfirm;
+       public bindings_instance: bindings.LDKConfirm|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Confirm_free);
                this.bindings_instance = null;
        }
@@ -517,7 +524,7 @@ export class Confirm extends CommonBase {
                impl_holder.held = new Confirm(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index bb354714e7473ac8adf4567cc21134043bbdec5b..92b547f1429a19b9be84d8670b92084a4c4f30c5 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CounterpartyChannelTransactionParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CounterpartyChannelTransactionParameters_free);
        }
 
index 31eaf174fadc9ce2d7c02b51952091be7dafe49f..21491dd5d7f55c3d2fef4bc9b82de229834fb621 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CounterpartyCommitmentSecrets extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CounterpartyCommitmentSecrets_free);
        }
 
index 0054941da563d4daa3fa60077b1a5b6ba6a1e06c..d93dc37829e6c2535ef62df75f93e622bc2ab438 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class CounterpartyForwardingInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CounterpartyForwardingInfo_free);
        }
 
index b2292787d3c7437f927c0ed6266036e26f55a4c3..1e9418a88523862d4b36690d03ec84f4e45d1690 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../struct
 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -395,7 +402,7 @@ export interface CustomMessageHandlerInterface {
 }
 
 class LDKCustomMessageHandlerHolder {
-       held: CustomMessageHandler;
+       held: CustomMessageHandler|null = null;
 }
 
 /**
@@ -403,13 +410,13 @@ class LDKCustomMessageHandlerHolder {
  */
 export class CustomMessageHandler extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKCustomMessageHandler;
+       public bindings_instance: bindings.LDKCustomMessageHandler|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CustomMessageHandler_free);
                this.bindings_instance = null;
        }
@@ -433,13 +440,13 @@ export class CustomMessageHandler extends CommonBase {
                        },
                } as bindings.LDKCustomMessageHandler;
                const customMessageReader = CustomMessageReader.new_impl(customMessageReader_impl, );
-               const ptr_idx: [bigint, number] = bindings.LDKCustomMessageHandler_new(structImplementation, customMessageReader.instance_idx);
+               const ptr_idx: [bigint, number] = bindings.LDKCustomMessageHandler_new(structImplementation, customMessageReader.instance_idx!);
 
                impl_holder.held = new CustomMessageHandler(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(customMessageReader);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 19bd9f3bedaa3c94754dab23ab3998deae4f4a0d..c5abea0271a5bb7f361e122423604e8e7bfa082d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../struct
 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -391,7 +398,7 @@ export interface CustomMessageReaderInterface {
 }
 
 class LDKCustomMessageReaderHolder {
-       held: CustomMessageReader;
+       held: CustomMessageReader|null = null;
 }
 
 /**
@@ -400,13 +407,13 @@ class LDKCustomMessageReaderHolder {
  */
 export class CustomMessageReader extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKCustomMessageReader;
+       public bindings_instance: bindings.LDKCustomMessageReader|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CustomMessageReader_free);
                this.bindings_instance = null;
        }
@@ -427,7 +434,7 @@ export class CustomMessageReader extends CommonBase {
                impl_holder.held = new CustomMessageReader(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
diff --git a/ts/structs/CustomOnionMessageContents.mts b/ts/structs/CustomOnionMessageContents.mts
new file mode 100644 (file)
index 0000000..ea7aee1
--- /dev/null
@@ -0,0 +1,474 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+/** An implementation of CustomOnionMessageContents */
+export interface CustomOnionMessageContentsInterface {
+       /**Returns the TLV type identifying the message contents. MUST be >= 64.
+        */
+       tlv_type(): bigint;
+       /**Serialize the object into a byte array
+        */
+       write(): Uint8Array;
+}
+
+class LDKCustomOnionMessageContentsHolder {
+       held: CustomOnionMessageContents|null = null;
+}
+
+/**
+ * The contents of a custom onion message.
+ */
+export class CustomOnionMessageContents extends CommonBase {
+       /* @internal */
+       public bindings_instance: bindings.LDKCustomOnionMessageContents|null;
+
+       /* @internal */
+       public instance_idx?: number;
+
+       /* @internal */
+       constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.CustomOnionMessageContents_free);
+               this.bindings_instance = null;
+       }
+
+       /** Creates a new instance of CustomOnionMessageContents from a given implementation */
+       public static new_impl(arg: CustomOnionMessageContentsInterface): CustomOnionMessageContents {
+               const impl_holder: LDKCustomOnionMessageContentsHolder = new LDKCustomOnionMessageContentsHolder();
+               let structImplementation = {
+                       tlv_type (): bigint {
+                               const ret: bigint = arg.tlv_type();
+                               return ret;
+                       },
+                       write (): number {
+                               const ret: Uint8Array = arg.write();
+                               const result: number = bindings.encodeUint8Array(ret);
+                               return result;
+                       },
+               } as bindings.LDKCustomOnionMessageContents;
+               const ptr_idx: [bigint, number] = bindings.LDKCustomOnionMessageContents_new(structImplementation);
+
+               impl_holder.held = new CustomOnionMessageContents(null, ptr_idx[0]);
+               impl_holder.held.instance_idx = ptr_idx[1];
+               impl_holder.held.bindings_instance = structImplementation;
+               return impl_holder.held!;
+       }
+
+       /**
+        * Returns the TLV type identifying the message contents. MUST be >= 64.
+        */
+       public tlv_type(): bigint {
+               const ret: bigint = bindings.CustomOnionMessageContents_tlv_type(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Serialize the object into a byte array
+        */
+       public write(): Uint8Array {
+               const ret: number = bindings.CustomOnionMessageContents_write(this.ptr);
+               const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+               return ret_conv;
+       }
+
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.CustomOnionMessageContents_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of a CustomOnionMessageContents
+        */
+       public clone(): CustomOnionMessageContents {
+               const ret: bigint = bindings.CustomOnionMessageContents_clone(this.ptr);
+               const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, this);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/CustomOnionMessageHandler.mts b/ts/structs/CustomOnionMessageHandler.mts
new file mode 100644 (file)
index 0000000..650f438
--- /dev/null
@@ -0,0 +1,472 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+/** An implementation of CustomOnionMessageHandler */
+export interface CustomOnionMessageHandlerInterface {
+       /**Called with the custom message that was received.
+        */
+       handle_custom_message(msg: CustomOnionMessageContents): void;
+       /**Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+        * message type is unknown.
+        */
+       read_custom_message(message_type: bigint, buffer: Uint8Array): Result_COption_CustomOnionMessageContentsZDecodeErrorZ;
+}
+
+class LDKCustomOnionMessageHandlerHolder {
+       held: CustomOnionMessageHandler|null = null;
+}
+
+/**
+ * Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`],
+ * [`SimpleRefOnionMessenger`], or prefer to ignore inbound custom onion messages,
+ * [`IgnoringMessageHandler`] must be provided to [`OnionMessenger::new`]. Otherwise, a custom
+ * implementation of this trait must be provided, with [`CustomMessage`] specifying the supported
+ * message types.
+ * 
+ * See [`OnionMessenger`] for example usage.
+ * 
+ * [`IgnoringMessageHandler`]: crate::ln::peer_handler::IgnoringMessageHandler
+ * [`CustomMessage`]: Self::CustomMessage
+ */
+export class CustomOnionMessageHandler extends CommonBase {
+       /* @internal */
+       public bindings_instance: bindings.LDKCustomOnionMessageHandler|null;
+
+       /* @internal */
+       public instance_idx?: number;
+
+       /* @internal */
+       constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.CustomOnionMessageHandler_free);
+               this.bindings_instance = null;
+       }
+
+       /** Creates a new instance of CustomOnionMessageHandler from a given implementation */
+       public static new_impl(arg: CustomOnionMessageHandlerInterface): CustomOnionMessageHandler {
+               const impl_holder: LDKCustomOnionMessageHandlerHolder = new LDKCustomOnionMessageHandlerHolder();
+               let structImplementation = {
+                       handle_custom_message (msg: bigint): void {
+                               const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, msg);
+                               CommonBase.add_ref_from(ret_hu_conv, this);
+                               arg.handle_custom_message(ret_hu_conv);
+                       },
+                       read_custom_message (message_type: bigint, buffer: number): bigint {
+                               const buffer_conv: Uint8Array = bindings.decodeUint8Array(buffer);
+                               const ret: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = arg.read_custom_message(message_type, buffer_conv);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
+                       },
+               } as bindings.LDKCustomOnionMessageHandler;
+               const ptr_idx: [bigint, number] = bindings.LDKCustomOnionMessageHandler_new(structImplementation);
+
+               impl_holder.held = new CustomOnionMessageHandler(null, ptr_idx[0]);
+               impl_holder.held.instance_idx = ptr_idx[1];
+               impl_holder.held.bindings_instance = structImplementation;
+               return impl_holder.held!;
+       }
+
+       /**
+        * Called with the custom message that was received.
+        */
+       public handle_custom_message(msg: CustomOnionMessageContents): void {
+               bindings.CustomOnionMessageHandler_handle_custom_message(this.ptr, msg == null ? 0n : CommonBase.get_ptr_of(msg));
+               CommonBase.add_ref_from(this, msg);
+       }
+
+       /**
+        * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
+        * message type is unknown.
+        */
+       public read_custom_message(message_type: bigint, buffer: Uint8Array): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               const ret: bigint = bindings.CustomOnionMessageHandler_read_custom_message(this.ptr, message_type, bindings.encodeUint8Array(buffer));
+               const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index c2fc0ed45de008e7d157acbcf5eeeb3fa15eb3c7..fe4d9a06a15c48030199c09699d2863ea6040c56 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DataLossProtect extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.DataLossProtect_free);
        }
 
@@ -449,4 +456,15 @@ export class DataLossProtect extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two DataLossProtects contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: DataLossProtect): boolean {
+               const ret: boolean = bindings.DataLossProtect_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
 }
index 541124c7ed293db4a36c49a1116fee0328d2a958..03f97d077484d58c58db038a30ccb11fadbb2158 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -377,14 +384,25 @@ import { DefaultRouter } from '../structs/DefaultRouter.mjs';
 import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
 import * as bindings from '../bindings.mjs'
 
-
 /**
  * An error in decoding a message or struct.
  */
 export class DecodeError extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.DecodeError_free); }
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
-               super(ptr, bindings.DecodeError_free);
+       public static constr_from_ptr(ptr: bigint): DecodeError {
+               const raw_ty: number = bindings.LDKDecodeError_ty_from_ptr(ptr);
+               switch (raw_ty) {
+                       case 0: return new DecodeError_UnknownVersion(ptr);
+                       case 1: return new DecodeError_UnknownRequiredFeature(ptr);
+                       case 2: return new DecodeError_InvalidValue(ptr);
+                       case 3: return new DecodeError_ShortRead(ptr);
+                       case 4: return new DecodeError_BadLengthDescriptor(ptr);
+                       case 5: return new DecodeError_Io(ptr);
+                       case 6: return new DecodeError_UnsupportedCompression(ptr);
+                       default:
+                               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+               }
        }
 
        public clone_ptr(): bigint {
@@ -397,9 +415,139 @@ export class DecodeError extends CommonBase {
         */
        public clone(): DecodeError {
                const ret: bigint = bindings.DecodeError_clone(this.ptr);
-               const ret_hu_conv: DecodeError = new DecodeError(null, ret);
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UnknownVersion-variant DecodeError
+        */
+       public static constructor_unknown_version(): DecodeError {
+               const ret: bigint = bindings.DecodeError_unknown_version();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new UnknownRequiredFeature-variant DecodeError
+        */
+       public static constructor_unknown_required_feature(): DecodeError {
+               const ret: bigint = bindings.DecodeError_unknown_required_feature();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new InvalidValue-variant DecodeError
+        */
+       public static constructor_invalid_value(): DecodeError {
+               const ret: bigint = bindings.DecodeError_invalid_value();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new ShortRead-variant DecodeError
+        */
+       public static constructor_short_read(): DecodeError {
+               const ret: bigint = bindings.DecodeError_short_read();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new BadLengthDescriptor-variant DecodeError
+        */
+       public static constructor_bad_length_descriptor(): DecodeError {
+               const ret: bigint = bindings.DecodeError_bad_length_descriptor();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Io-variant DecodeError
+        */
+       public static constructor_io(a: IOError): DecodeError {
+               const ret: bigint = bindings.DecodeError_io(a);
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new UnsupportedCompression-variant DecodeError
+        */
+       public static constructor_unsupported_compression(): DecodeError {
+               const ret: bigint = bindings.DecodeError_unsupported_compression();
+               const ret_hu_conv: DecodeError = DecodeError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two DecodeErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: DecodeError): boolean {
+               const ret: boolean = bindings.DecodeError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
+}
+/** A DecodeError of type UnknownVersion */
+export class DecodeError_UnknownVersion extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
+/** A DecodeError of type UnknownRequiredFeature */
+export class DecodeError_UnknownRequiredFeature extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
+/** A DecodeError of type InvalidValue */
+export class DecodeError_InvalidValue extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
+/** A DecodeError of type ShortRead */
+export class DecodeError_ShortRead extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
+/** A DecodeError of type BadLengthDescriptor */
+export class DecodeError_BadLengthDescriptor extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
+/** A DecodeError of type Io */
+export class DecodeError_Io extends DecodeError {
+       public io: IOError;
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+               this.io = bindings.LDKDecodeError_Io_get_io(ptr);
+       }
+}
+/** A DecodeError of type UnsupportedCompression */
+export class DecodeError_UnsupportedCompression extends DecodeError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
 }
index 821b87f80755e859115c5cdd6707059d9245ca79..72b361dff6098741ce53efb2dc9e1aaca8921f61 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DefaultRouter extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.DefaultRouter_free);
        }
 
index 62ab3160d08e1bc95b01383db8b44712714f33dc..9ac11b15041dad475561894b41261bb39188225f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DelayedPaymentOutputDescriptor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.DelayedPaymentOutputDescriptor_free);
        }
 
@@ -536,6 +543,17 @@ export class DelayedPaymentOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two DelayedPaymentOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: DelayedPaymentOutputDescriptor): boolean {
+               const ret: boolean = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read
         */
index 69acc94fa024af2e1474b02d7144dffce8430c12..81e2ed499aafe1cc9dc964ba5d2beecb3c286f4d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Description extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Description_free);
        }
 
index 76fa3e6376ed4e503be52c18c75b76e32076fe5d..1b481d48da8b4d2b4d2d97f779f52ea0547ff3f8 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
 import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * The destination of an onion message.
  */
 export class Destination extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Destination_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Destination_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Destination {
                const raw_ty: number = bindings.LDKDestination_ty_from_ptr(ptr);
index 616adda197a22e55666a3b659865e2a735f20489..e913447c5e90e03175a74484e5de319972631886 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DirectedChannelInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.DirectedChannelInfo_free);
        }
 
index 761d46887f41dd061a980384e4ba8bc8ff97499c..9be3bd4b79051a6d777c9647b635fbcd29c91c06 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class DirectedChannelTransactionParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.DirectedChannelTransactionParameters_free);
        }
 
index d62d327e0039abf515c0bad0375db28e022845f2..5859701e40eefae17702419f38eb921e68f5fbc0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  * [`Self::as_msat`] should not be routed through the channel.
  */
 export class EffectiveCapacity extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.EffectiveCapacity_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.EffectiveCapacity_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): EffectiveCapacity {
                const raw_ty: number = bindings.LDKEffectiveCapacity_ty_from_ptr(ptr);
index f3fd96ef3529f7d222f1dd44d5574dcc802b1e25..c816de116d5a9e9f1dbc379c7b6b76411feb0550 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * Used to put an error message in a LightningError
  */
 export class ErrorAction extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ErrorAction_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ErrorAction_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): ErrorAction {
                const raw_ty: number = bindings.LDKErrorAction_ty_from_ptr(ptr);
index 3d3bb9b7f0b70d6ef7d3800c1eb12d74ccf52230..4c8634b6cc66bd970138b90961741b61e70597e6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ErrorMessage extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ErrorMessage_free);
        }
 
@@ -456,6 +463,17 @@ export class ErrorMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ErrorMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ErrorMessage): boolean {
+               const ret: boolean = bindings.ErrorMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ErrorMessage object into a byte array which can be read by ErrorMessage_read
         */
index 4f8b6c1f05406e3407f142e89138c8ab3b516b6c..7fb10ab7571427d0df9b0840aa9bed6140ebf9bc 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
 import { PeerManager } from '../structs/PeerManager.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ErroringMessageHandler extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ErroringMessageHandler_free);
        }
 
index cfbb2ad8dfe18d6d0fba5fe224d0da0970e2fd5d..5883ee3c0a2bac88f0cb2a2c036a48d40c1c4473 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  * written as it makes no sense to respond to it after reconnecting to peers).
  */
 export class Event extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Event_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Event_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Event {
                const raw_ty: number = bindings.LDKEvent_ty_from_ptr(ptr);
index e738605b9d850ec3bc043c0d8cb01e30f823b229..2849e4596a485091317ece5143a6f65318e2e58a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,7 +397,7 @@ export interface EventHandlerInterface {
 }
 
 class LDKEventHandlerHolder {
-       held: EventHandler;
+       held: EventHandler|null = null;
 }
 
 /**
@@ -398,13 +405,13 @@ class LDKEventHandlerHolder {
  */
 export class EventHandler extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKEventHandler;
+       public bindings_instance: bindings.LDKEventHandler|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.EventHandler_free);
                this.bindings_instance = null;
        }
@@ -423,7 +430,7 @@ export class EventHandler extends CommonBase {
                impl_holder.held = new EventHandler(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index d42dc6362faa4bec10f0c0a454d6cda5812c7c8c..a0c6dba31f978586ef570266c2e182f9b9204766 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,7 +397,7 @@ export interface EventsProviderInterface {
 }
 
 class LDKEventsProviderHolder {
-       held: EventsProvider;
+       held: EventsProvider|null = null;
 }
 
 /**
@@ -427,13 +434,13 @@ class LDKEventsProviderHolder {
  */
 export class EventsProvider extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKEventsProvider;
+       public bindings_instance: bindings.LDKEventsProvider|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.EventsProvider_free);
                this.bindings_instance = null;
        }
@@ -453,7 +460,7 @@ export class EventsProvider extends CommonBase {
                impl_holder.held = new EventsProvider(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 1249ba0c66821341e54bd91ae248356fd06e88ba..f775768ba90c8e107b5c59b3c11e173f3aaa1d2b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ExpandedKey extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ExpandedKey_free);
        }
 
index d1cf90529749e3ea68499d50ea2ea5423d76d54b..dfc5aa32d33eae5306c14c59a75f9ef867c75391 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ExpiryTime extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ExpiryTime_free);
        }
 
@@ -433,7 +440,7 @@ export class ExpiryTime extends CommonBase {
        }
 
        /**
-        * Construct an `ExpiryTime` from a `Duration`.
+        * Construct an `ExpiryTime` from a `Duration`, dropping the sub-second part.
         */
        public static constructor_from_duration(duration: bigint): ExpiryTime {
                const ret: bigint = bindings.ExpiryTime_from_duration(duration);
index 9865f1bbafd60ce845ed1ac6628268c257320ea6..d9a8190236f8316264aed67638c92265033e5932 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * Fallback address in case no LN payment is possible
  */
 export class Fallback extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Fallback_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Fallback_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Fallback {
                const raw_ty: number = bindings.LDKFallback_ty_from_ptr(ptr);
index 4b3ff7b2b7d9734527160bae913418e91e3e27fc..871dea58aeb768838d48c5c9fcbae79fcebadcc0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -395,7 +402,7 @@ export interface FeeEstimatorInterface {
 }
 
 class LDKFeeEstimatorHolder {
-       held: FeeEstimator;
+       held: FeeEstimator|null = null;
 }
 
 /**
@@ -407,13 +414,13 @@ class LDKFeeEstimatorHolder {
  */
 export class FeeEstimator extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKFeeEstimator;
+       public bindings_instance: bindings.LDKFeeEstimator|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.FeeEstimator_free);
                this.bindings_instance = null;
        }
@@ -432,7 +439,7 @@ export class FeeEstimator extends CommonBase {
                impl_holder.held = new FeeEstimator(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 7868528fde159a7ca5f10cade979d19483f548fb..c0b8a1d5989432e16e3db0d205ae2b6cf3b5b05a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -397,7 +404,7 @@ export interface FilterInterface {
 }
 
 class LDKFilterHolder {
-       held: Filter;
+       held: Filter|null = null;
 }
 
 /**
@@ -416,21 +423,21 @@ class LDKFilterHolder {
  * Note that use as part of a [`Watch`] implementation involves reentrancy. Therefore, the `Filter`
  * should not block on I/O. Implementations should instead queue the newly monitored data to be
  * processed later. Then, in order to block until the data has been processed, any [`Watch`]
- * invocation that has called the `Filter` must return [`TemporaryFailure`].
+ * invocation that has called the `Filter` must return [`InProgress`].
  * 
- * [`TemporaryFailure`]: ChannelMonitorUpdateErr::TemporaryFailure
+ * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
  * [BIP 157]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
  * [BIP 158]: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki
  */
 export class Filter extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKFilter;
+       public bindings_instance: bindings.LDKFilter|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Filter_free);
                this.bindings_instance = null;
        }
@@ -455,7 +462,7 @@ export class Filter extends CommonBase {
                impl_holder.held = new Filter(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index be8b22d582e08c672f704d9209fe2746fe986cd3..fd9e91738565948723d0703bf159f8969bfb5d74 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class FixedPenaltyScorer extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.FixedPenaltyScorer_free);
        }
 
index 95b7e578f5411a03d25e88c0658d53cc42546140..05857efc3c7a187562f51589001ef44f317439b9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class FundingCreated extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.FundingCreated_free);
        }
 
@@ -475,6 +482,17 @@ export class FundingCreated extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two FundingCreateds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: FundingCreated): boolean {
+               const ret: boolean = bindings.FundingCreated_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the FundingCreated object into a byte array which can be read by FundingCreated_read
         */
index 04a3d47dd69f21c721d6f63b84dc1ded5280056d..9016e19eea0a093b1bca39321ff48f85b9296b41 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class FundingSigned extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.FundingSigned_free);
        }
 
@@ -444,6 +451,17 @@ export class FundingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two FundingSigneds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: FundingSigned): boolean {
+               const ret: boolean = bindings.FundingSigned_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the FundingSigned object into a byte array which can be read by FundingSigned_read
         */
index 8c9d7cdcf1d76644b50be49a1879934dd2d5e54e..a178bae65508c67ce6df90db0f7eb26f5cc29bc6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Future extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Future_free);
        }
 
index a4a1490a8151277697c0aee261ea806b02c2330d..0cef7cb9b02c396a905bc65e6ca81f0153d276ee 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface FutureCallbackInterface {
 }
 
 class LDKFutureCallbackHolder {
-       held: FutureCallback;
+       held: FutureCallback|null = null;
 }
 
 /**
@@ -403,13 +410,13 @@ class LDKFutureCallbackHolder {
  */
 export class FutureCallback extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKFutureCallback;
+       public bindings_instance: bindings.LDKFutureCallback|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.FutureCallback_free);
                this.bindings_instance = null;
        }
@@ -427,7 +434,7 @@ export class FutureCallback extends CommonBase {
                impl_holder.held = new FutureCallback(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index f8c8e7ca14e83f9781013d0ff0abcc936a7e93da..81d742a21767460f8a1d978d6c576adc43b094ca 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class GossipTimestampFilter extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.GossipTimestampFilter_free);
        }
 
@@ -460,6 +467,17 @@ export class GossipTimestampFilter extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two GossipTimestampFilters contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: GossipTimestampFilter): boolean {
+               const ret: boolean = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the GossipTimestampFilter object into a byte array which can be read by GossipTimestampFilter_read
         */
diff --git a/ts/structs/GraphSyncError.mts b/ts/structs/GraphSyncError.mts
new file mode 100644 (file)
index 0000000..389a77b
--- /dev/null
@@ -0,0 +1,463 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+/**
+ * All-encompassing standard error type that processing can return
+ */
+export class GraphSyncError extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.GraphSyncError_free); }
+       /* @internal */
+       public static constr_from_ptr(ptr: bigint): GraphSyncError {
+               const raw_ty: number = bindings.LDKGraphSyncError_ty_from_ptr(ptr);
+               switch (raw_ty) {
+                       case 0: return new GraphSyncError_DecodeError(ptr);
+                       case 1: return new GraphSyncError_LightningError(ptr);
+                       default:
+                               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+               }
+       }
+
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.GraphSyncError_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the GraphSyncError
+        */
+       public clone(): GraphSyncError {
+               const ret: bigint = bindings.GraphSyncError_clone(this.ptr);
+               const ret_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new DecodeError-variant GraphSyncError
+        */
+       public static constructor_decode_error(a: DecodeError): GraphSyncError {
+               const ret: bigint = bindings.GraphSyncError_decode_error(CommonBase.get_ptr_of(a));
+               const ret_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new LightningError-variant GraphSyncError
+        */
+       public static constructor_lightning_error(a: LightningError): GraphSyncError {
+               const ret: bigint = bindings.GraphSyncError_lightning_error(a == null ? 0n : CommonBase.get_ptr_of(a));
+               const ret_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               CommonBase.add_ref_from(ret_hu_conv, a);
+               return ret_hu_conv;
+       }
+
+}
+/** A GraphSyncError of type DecodeError */
+export class GraphSyncError_DecodeError extends GraphSyncError {
+       public decode_error: DecodeError;
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+               const decode_error: bigint = bindings.LDKGraphSyncError_DecodeError_get_decode_error(ptr);
+               const decode_error_hu_conv: DecodeError = DecodeError.constr_from_ptr(decode_error);
+                       CommonBase.add_ref_from(decode_error_hu_conv, this);
+               this.decode_error = decode_error_hu_conv;
+       }
+}
+/** A GraphSyncError of type LightningError */
+export class GraphSyncError_LightningError extends GraphSyncError {
+       public lightning_error: LightningError;
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+               const lightning_error: bigint = bindings.LDKGraphSyncError_LightningError_get_lightning_error(ptr);
+               const lightning_error_hu_conv: LightningError = new LightningError(null, lightning_error);
+                       CommonBase.add_ref_from(lightning_error_hu_conv, this);
+               this.lightning_error = lightning_error_hu_conv;
+       }
+}
index 647df1413f463fdda6cc344b44849d7fac86b86c..4331ed4bd5d17c732de35201748ec7ab15b2c8d4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`].
  */
 export class HTLCDestination extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.HTLCDestination_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.HTLCDestination_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): HTLCDestination {
                const raw_ty: number = bindings.LDKHTLCDestination_ty_from_ptr(ptr);
@@ -439,6 +446,15 @@ export class HTLCDestination extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCDestinations contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: HTLCDestination): boolean {
+               const ret: boolean = bindings.HTLCDestination_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
         */
index e95b787ba18768044403aa7592f2024c6e2bf9e9..aca691e4ecb943ad75cafea26f5e546cc0c06237 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class HTLCOutputInCommitment extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.HTLCOutputInCommitment_free);
        }
 
@@ -502,6 +509,17 @@ export class HTLCOutputInCommitment extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCOutputInCommitments contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: HTLCOutputInCommitment): boolean {
+               const ret: boolean = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the HTLCOutputInCommitment object into a byte array which can be read by HTLCOutputInCommitment_read
         */
index 1fb63bca84420dfd895fb9b6ee6e05f9d9a79be2..429c2b9369d77010f7d7a00fe0017e3e31f1b3cb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class HTLCUpdate extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.HTLCUpdate_free);
        }
 
@@ -404,6 +411,17 @@ export class HTLCUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two HTLCUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: HTLCUpdate): boolean {
+               const ret: boolean = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the HTLCUpdate object into a byte array which can be read by HTLCUpdate_read
         */
index 13612e62109e25ea112d51bcbc27b003518b1965..5b7694e1ba28d246df5c96f351a68921e419f3a1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class HolderCommitmentTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.HolderCommitmentTransaction_free);
        }
 
index db3cfc27d83da147216b217c8d69a15043fc1c8e..bae9c6331bb3660d6bbbfdb432090f762548c46b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Hostname extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Hostname_free);
        }
 
@@ -406,6 +413,17 @@ export class Hostname extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Hostnames contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: Hostname): boolean {
+               const ret: boolean = bindings.Hostname_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Returns the length of the hostname.
         */
index 120ed2dfc77e50f7bf1e4b68b19da9e3b3117452..55ffcacb8aae6de5185c436a042a99744279ac7e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../struct
 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class IgnoringMessageHandler extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.IgnoringMessageHandler_free);
        }
 
@@ -442,6 +449,17 @@ export class IgnoringMessageHandler extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Constructs a new CustomOnionMessageHandler which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned CustomOnionMessageHandler must be freed before this_arg is
+        */
+       public as_CustomOnionMessageHandler(): CustomOnionMessageHandler {
+               const ret: bigint = bindings.IgnoringMessageHandler_as_CustomOnionMessageHandler(this.ptr);
+               const ret_hu_conv: CustomOnionMessageHandler = new CustomOnionMessageHandler(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, this);
+               return ret_hu_conv;
+       }
+
        /**
         * Constructs a new CustomMessageReader which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned CustomMessageReader must be freed before this_arg is
index 4c54f1e75eabf30a16101761793753b5876b4a68..f14d10eeb24e5d56e5a6e9f3d111567203cd6825 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InFlightHtlcs extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InFlightHtlcs_free);
        }
 
index 5888dd5087d19b1c95adc8d0cce0157538bbf88f..79503db806a2dfb72f8531aad71dbf11c6b070e9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InMemorySigner extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InMemorySigner_free);
        }
 
index d861213b9c189678dcbd012402c3ebaa9fff2972..d92484efbca75556d39c2a4ba0fa78ae98e91ee0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Init extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Init_free);
        }
 
@@ -454,6 +461,17 @@ export class Init extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Inits contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: Init): boolean {
+               const ret: boolean = bindings.Init_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the Init object into a byte array which can be read by Init_read
         */
index b9936f264b5013d72144fa9cc555d74c15dc5036..1d20f62051c310516c17395295be2b0b4e8d1fcd 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InitFeatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InitFeatures_free);
        }
 
@@ -413,17 +420,6 @@ export class InitFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Returns the set of known init features that are related to channels. At least some of
-        * these features are likely required for peers to talk to us.
-        */
-       public static constructor_known_channel_features(): InitFeatures {
-               const ret: bigint = bindings.InitFeatures_known_channel_features();
-               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Create a blank Features with no features set
         */
@@ -434,16 +430,6 @@ export class InitFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static constructor_known(): InitFeatures {
-               const ret: bigint = bindings.InitFeatures_known();
-               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index f1e26e6eaf8b360670447b8778f471c48534e8d9..41290e1032dbcfe85c930dade0d7b97384bc73d3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InvalidShutdownScript extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InvalidShutdownScript_free);
        }
 
index 675b607e71ecdf864cc1b0f0fc9c88e5c1393919..dd85583398d5bba8254f304d4a8df98ef0a2d403 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Invoice extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Invoice_free);
        }
 
index 7f7a2a3b0a3f6b4a7ca634c869c4c60c39e8a6af..07f0a413b3b8b7937ea3a454033a99e404bf30a2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InvoiceFeatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InvoiceFeatures_free);
        }
 
@@ -423,16 +430,6 @@ export class InvoiceFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static constructor_known(): InvoiceFeatures {
-               const ret: bigint = bindings.InvoiceFeatures_known();
-               const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index 2ae71cd29be9e4f56a16d2564b6279535f2b42b7..a6c07ff5e5badafb9ebc479691f687c05e2be364 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InvoicePayer extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InvoicePayer_free);
        }
 
index f94c97015c85e36e96d3fcfee14c2b00587b4fa5..1679f173561dfbe8643b93daa471c4670725779c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class InvoiceSignature extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.InvoiceSignature_free);
        }
 
index a3f4d1a61fe7ab69ec85fe6e58ac69b59b9d8be1..314d13ae952471df761aa17fe37810f3726ffbb3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,12 +395,27 @@ export interface KeysInterfaceInterface {
         * 
         * This method must return the same value each time it is called with a given `Recipient`
         * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        get_node_secret(recipient: Recipient): Result_SecretKeyNoneZ;
+       /**Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+        * [`get_node_secret`].
+        * 
+        * This method must return the same value each time it is called with a given `Recipient`
+        * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
+        * [`get_node_secret`]: KeysInterface::get_node_secret
+        */
+       get_node_id(recipient: Recipient): Result_PublicKeyNoneZ;
        /**Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
         * one is provided. Note that this tweak can be applied to `other_key` instead of our node
         * secret, though this is less efficient.
         * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
         * [`node secret`]: Self::get_node_secret
         */
        ecdh(recipient: Recipient, other_key: Uint8Array, tweak: Option_ScalarZ): Result_SharedSecretNoneZ;
@@ -437,6 +459,8 @@ export interface KeysInterfaceInterface {
         * The hrp is ascii bytes, while the invoice data is base32.
         * 
         * The secret key used to sign the invoice is dependent on the [`Recipient`].
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        sign_invoice(hrp_bytes: Uint8Array, invoice_data: UInt5[], receipient: Recipient): Result_RecoverableSignatureNoneZ;
        /**Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
@@ -453,7 +477,7 @@ export interface KeysInterfaceInterface {
 }
 
 class LDKKeysInterfaceHolder {
-       held: KeysInterface;
+       held: KeysInterface|null = null;
 }
 
 /**
@@ -461,13 +485,13 @@ class LDKKeysInterfaceHolder {
  */
 export class KeysInterface extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKKeysInterface;
+       public bindings_instance: bindings.LDKKeysInterface|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.KeysInterface_free);
                this.bindings_instance = null;
        }
@@ -481,6 +505,11 @@ export class KeysInterface extends CommonBase {
                                const result: bigint = ret == null ? 0n : ret.clone_ptr();
                                return result;
                        },
+                       get_node_id (recipient: Recipient): bigint {
+                               const ret: Result_PublicKeyNoneZ = arg.get_node_id(recipient);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
+                       },
                        ecdh (recipient: Recipient, other_key: number, tweak: bigint): bigint {
                                const other_key_conv: Uint8Array = bindings.decodeUint8Array(other_key);
                                const tweak_hu_conv: Option_ScalarZ = Option_ScalarZ.constr_from_ptr(tweak);
@@ -541,7 +570,7 @@ export class KeysInterface extends CommonBase {
                impl_holder.held = new KeysInterface(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -551,6 +580,8 @@ export class KeysInterface extends CommonBase {
         * 
         * This method must return the same value each time it is called with a given `Recipient`
         * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        public get_node_secret(recipient: Recipient): Result_SecretKeyNoneZ {
                const ret: bigint = bindings.KeysInterface_get_node_secret(this.ptr, recipient);
@@ -558,11 +589,30 @@ export class KeysInterface extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Get node id based on the provided [`Recipient`]. This public key corresponds to the secret in
+        * [`get_node_secret`].
+        * 
+        * This method must return the same value each time it is called with a given `Recipient`
+        * parameter.
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
+        * [`get_node_secret`]: KeysInterface::get_node_secret
+        */
+       public get_node_id(recipient: Recipient): Result_PublicKeyNoneZ {
+               const ret: bigint = bindings.KeysInterface_get_node_id(this.ptr, recipient);
+               const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
         * one is provided. Note that this tweak can be applied to `other_key` instead of our node
         * secret, though this is less efficient.
         * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
+        * 
         * [`node secret`]: Self::get_node_secret
         */
        public ecdh(recipient: Recipient, other_key: Uint8Array, tweak: Option_ScalarZ): Result_SharedSecretNoneZ {
@@ -644,6 +694,8 @@ export class KeysInterface extends CommonBase {
         * The hrp is ascii bytes, while the invoice data is base32.
         * 
         * The secret key used to sign the invoice is dependent on the [`Recipient`].
+        * 
+        * Errors if the `Recipient` variant is not supported by the implementation.
         */
        public sign_invoice(hrp_bytes: Uint8Array, invoice_data: UInt5[], receipient: Recipient): Result_RecoverableSignatureNoneZ {
                const ret: bigint = bindings.KeysInterface_sign_invoice(this.ptr, bindings.encodeUint8Array(hrp_bytes), bindings.encodeUint8Array(invoice_data != null ? bindings.uint5ArrToBytes(invoice_data) : null), receipient);
index 72836b393e79c4bd26753fc739ce3630be92b1bc..e77f22226b5f38441cf7940e832436e45d17e99e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -395,7 +402,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class KeysManager extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.KeysManager_free);
        }
 
index 2003e45b8571ed23adb5efc6cfa18daa042d4472..aafd8ffffdee000c93fdcbcca6753230389bffa3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class LightningError extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.LightningError_free);
        }
 
index d7ead54e6c58b45db1d24ce0a40729ebc7551bd1..7e3044257c6c2bfc5060bf5aad06bf6eccbcd161 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -395,7 +402,7 @@ export interface ListenInterface {
 }
 
 class LDKListenHolder {
-       held: Listen;
+       held: Listen|null = null;
 }
 
 /**
@@ -413,13 +420,13 @@ class LDKListenHolder {
  */
 export class Listen extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKListen;
+       public bindings_instance: bindings.LDKListen|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Listen_free);
                this.bindings_instance = null;
        }
@@ -455,7 +462,7 @@ export class Listen extends CommonBase {
                impl_holder.held = new Listen(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index d167426ca8510eda4c8784d31c9e2bf6bca911d9..fa24b47eb25129f3d28a63ed66a781b113ea9d32 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface LockableScoreInterface {
 }
 
 class LDKLockableScoreHolder {
-       held: LockableScore;
+       held: LockableScore|null = null;
 }
 
 /**
@@ -403,13 +410,13 @@ class LDKLockableScoreHolder {
  */
 export class LockableScore extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKLockableScore;
+       public bindings_instance: bindings.LDKLockableScore|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.LockableScore_free);
                this.bindings_instance = null;
        }
@@ -430,7 +437,7 @@ export class LockableScore extends CommonBase {
                impl_holder.held = new LockableScore(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index b97068c2ae5e5d742b26159161f31eac6fadc308..a4986b4c817b072b0cc127180b508dda5db3b4d1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class LockedChannelMonitor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
        }
        /** Releases this lock */
index 5d6396fdae8bfd502c25bc5a231b8d7aae632034..17eff939a4b78a141c1ffc95ef33c7947d90280a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface LoggerInterface {
 }
 
 class LDKLoggerHolder {
-       held: Logger;
+       held: Logger|null = null;
 }
 
 /**
@@ -396,13 +403,13 @@ class LDKLoggerHolder {
  */
 export class Logger extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKLogger;
+       public bindings_instance: bindings.LDKLogger|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Logger_free);
                this.bindings_instance = null;
        }
@@ -421,7 +428,7 @@ export class Logger extends CommonBase {
                impl_holder.held = new Logger(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
 }
index 9df29456004524fe6d1794d2bc60905525e88bc0..eac3bbb0483164286c204502a9471458b6ce3684 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
 import { PeerManager } from '../structs/PeerManager.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class MessageHandler extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MessageHandler_free);
        }
 
index 643849e9e61c7c7a6e6f81dd476e0bcf13414be8..34675b1fc79f27fdfd72fb0072a16783f7cca0e7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
 import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  * These events are handled by PeerManager::process_events if you are using a PeerManager.
  */
 export class MessageSendEvent extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.MessageSendEvent_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.MessageSendEvent_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): MessageSendEvent {
                const raw_ty: number = bindings.LDKMessageSendEvent_ty_from_ptr(ptr);
index cb6fb229dd325b72ba9f5bae77c390d6c91cde48..addf0ddc97325ed5ba116e20760e2de89af96b38 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -389,7 +396,7 @@ export interface MessageSendEventsProviderInterface {
 }
 
 class LDKMessageSendEventsProviderHolder {
-       held: MessageSendEventsProvider;
+       held: MessageSendEventsProvider|null = null;
 }
 
 /**
@@ -397,13 +404,13 @@ class LDKMessageSendEventsProviderHolder {
  */
 export class MessageSendEventsProvider extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKMessageSendEventsProvider;
+       public bindings_instance: bindings.LDKMessageSendEventsProvider|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MessageSendEventsProvider_free);
                this.bindings_instance = null;
        }
@@ -423,7 +430,7 @@ export class MessageSendEventsProvider extends CommonBase {
                impl_holder.held = new MessageSendEventsProvider(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 24bb1055295ffda0b377b07cdf4d88560ba45748..1d2f4abcb46576184039dac139de128e23dc3049 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class MinFinalCltvExpiry extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MinFinalCltvExpiry_free);
        }
 
index bd61ff2c69225f5aca7108b5b9511a2c1c406b9b..fc6e56abe0198ab63dab3cb4d62bc6622f14ca94 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,14 +388,14 @@ import * as bindings from '../bindings.mjs'
  * An event to be processed by the ChannelManager.
  */
 export class MonitorEvent extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.MonitorEvent_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.MonitorEvent_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): MonitorEvent {
                const raw_ty: number = bindings.LDKMonitorEvent_ty_from_ptr(ptr);
                switch (raw_ty) {
                        case 0: return new MonitorEvent_HTLCEvent(ptr);
                        case 1: return new MonitorEvent_CommitmentTxConfirmed(ptr);
-                       case 2: return new MonitorEvent_UpdateCompleted(ptr);
+                       case 2: return new MonitorEvent_Completed(ptr);
                        case 3: return new MonitorEvent_UpdateFailed(ptr);
                        default:
                                throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
@@ -433,10 +440,10 @@ export class MonitorEvent extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new UpdateCompleted-variant MonitorEvent
+        * Utility method to constructs a new Completed-variant MonitorEvent
         */
-       public static constructor_update_completed(funding_txo: OutPoint, monitor_update_id: bigint): MonitorEvent {
-               const ret: bigint = bindings.MonitorEvent_update_completed(funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor_update_id);
+       public static constructor_completed(funding_txo: OutPoint, monitor_update_id: bigint): MonitorEvent {
+               const ret: bigint = bindings.MonitorEvent_completed(funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor_update_id);
                const ret_hu_conv: MonitorEvent = MonitorEvent.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                CommonBase.add_ref_from(ret_hu_conv, funding_txo);
@@ -454,6 +461,15 @@ export class MonitorEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two MonitorEvents contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: MonitorEvent): boolean {
+               const ret: boolean = bindings.MonitorEvent_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the MonitorEvent object into a byte array which can be read by MonitorEvent_read
         */
@@ -488,8 +504,8 @@ export class MonitorEvent_CommitmentTxConfirmed extends MonitorEvent {
                this.commitment_tx_confirmed = commitment_tx_confirmed_hu_conv;
        }
 }
-/** A MonitorEvent of type UpdateCompleted */
-export class MonitorEvent_UpdateCompleted extends MonitorEvent {
+/** A MonitorEvent of type Completed */
+export class MonitorEvent_Completed extends MonitorEvent {
        /**
         * The funding outpoint of the [`ChannelMonitor`] that was updated
         */
@@ -505,11 +521,11 @@ export class MonitorEvent_UpdateCompleted extends MonitorEvent {
        /* @internal */
        public constructor(ptr: bigint) {
                super(null, ptr);
-               const funding_txo: bigint = bindings.LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
+               const funding_txo: bigint = bindings.LDKMonitorEvent_Completed_get_funding_txo(ptr);
                const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
                        CommonBase.add_ref_from(funding_txo_hu_conv, this);
                this.funding_txo = funding_txo_hu_conv;
-               this.monitor_update_id = bindings.LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
+               this.monitor_update_id = bindings.LDKMonitorEvent_Completed_get_monitor_update_id(ptr);
        }
 }
 /** A MonitorEvent of type UpdateFailed */
index 9c3835cbb11ac9bc14f5360264a4b470dca9c4aa..bd8e8d94f275c9c596731f843ac47637780c420e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class MonitorUpdateId extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MonitorUpdateId_free);
        }
 
index 8c76dde982c7a142c332df30f16f9da14bc933d2..bffc35d36d61bb38d035ebb9355b376e119879f6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class MultiThreadedLockableScore extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MultiThreadedLockableScore_free);
        }
 
index 8510e386b6195b45e8774f25e6bd5ac611f56a5d..9385403168e88de6be3ab4832a955b9f3a344ea7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class MultiThreadedScoreLock extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.MultiThreadedScoreLock_free);
        }
 
index c581d57aebfcf901a961f2bcdd4b5899a134365c..412ad4501619db9f25095f66e9f13f7636056cde 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An address which can be used to connect to a remote peer
  */
 export class NetAddress extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.NetAddress_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.NetAddress_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): NetAddress {
                const raw_ty: number = bindings.LDKNetAddress_ty_from_ptr(ptr);
@@ -462,6 +469,15 @@ export class NetAddress extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetAddresss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: NetAddress): boolean {
+               const ret: boolean = bindings.NetAddress_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
         */
index 43d500fa281207966ce1377e058708ae35b03dd0..f8e3a64553182ac5c9232e3f3420529580440ef0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NetworkGraph extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NetworkGraph_free);
        }
 
@@ -545,10 +552,11 @@ export class NetworkGraph extends CommonBase {
        }
 
        /**
-        * Marks a node in the graph as failed.
+        * Marks a node in the graph as permanently failed, effectively removing it and its channels
+        * from local storage.
         */
-       public node_failed(_node_id: Uint8Array, is_permanent: boolean): void {
-               bindings.NetworkGraph_node_failed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(_node_id, 33)), is_permanent);
+       public node_failed_permanent(node_id: Uint8Array): void {
+               bindings.NetworkGraph_node_failed_permanent(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(node_id, 33)));
        }
 
        /**
@@ -560,11 +568,14 @@ export class NetworkGraph extends CommonBase {
         * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
         * pruning occur for updates which are at least two weeks old, which we implement here.
         * 
+        * This method will also cause us to stop tracking removed nodes and channels if they have been
+        * in the map for a while so that these can be resynced from gossip in the future.
+        * 
         * This function takes the current unix time as an argument. For users with the `std` feature
-        * enabled, [`NetworkGraph::remove_stale_channels`] may be preferable.
+        * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
         */
-       public remove_stale_channels_with_time(current_time_unix: bigint): void {
-               bindings.NetworkGraph_remove_stale_channels_with_time(this.ptr, current_time_unix);
+       public remove_stale_channels_and_tracking_with_time(current_time_unix: bigint): void {
+               bindings.NetworkGraph_remove_stale_channels_and_tracking_with_time(this.ptr, current_time_unix);
        }
 
        /**
index 728aa8481c3608fe1a8296408d53ca078e1104af..060106ead95bdd7f41ff64b11cbc6bd4c6594d8f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  * [BOLT #4]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md
  */
 export class NetworkUpdate extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.NetworkUpdate_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.NetworkUpdate_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): NetworkUpdate {
                const raw_ty: number = bindings.LDKNetworkUpdate_ty_from_ptr(ptr);
@@ -443,6 +450,15 @@ export class NetworkUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NetworkUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: NetworkUpdate): boolean {
+               const ret: boolean = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
         */
index 495e6a893e462a494a65fd370f5e7fe22d570968..81b8f5784aab888772ff8b3c0f11630646f19cef 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeAlias extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeAlias_free);
        }
 
@@ -425,6 +432,17 @@ export class NodeAlias extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAliass contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: NodeAlias): boolean {
+               const ret: boolean = bindings.NodeAlias_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
         */
index 4beed2bece66c4918a7c61a2d55902ad4ca7cfbd..958e265ee18992e069f879e3e3c176c089f7af31 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeAnnouncement extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeAnnouncement_free);
        }
 
@@ -447,6 +454,17 @@ export class NodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: NodeAnnouncement): boolean {
+               const ret: boolean = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the NodeAnnouncement object into a byte array which can be read by NodeAnnouncement_read
         */
index 494992e1fc74fdd5c3270a4074d7d8b0fc5d9d14..4df80a7a562a469670039e6e087aceadb0890c91 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeAnnouncementInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeAnnouncementInfo_free);
        }
 
@@ -509,7 +516,7 @@ export class NodeAnnouncementInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_announcement_message(val: NodeAnnouncement): void {
+       public set_announcement_message(val: NodeAnnouncement|null): void {
                bindings.NodeAnnouncementInfo_set_announcement_message(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -542,6 +549,17 @@ export class NodeAnnouncementInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeAnnouncementInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: NodeAnnouncementInfo): boolean {
+               const ret: boolean = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
         */
index cf8437a16eae3a0fbec2a594c8ddff29c077df0b..3cd1a0f0de2a20ae73e2e627de2ebd697f46e929 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeFeatures extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeFeatures_free);
        }
 
@@ -413,16 +420,6 @@ export class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Returns the set of known node features that are related to channels.
-        */
-       public static constructor_known_channel_features(): NodeFeatures {
-               const ret: bigint = bindings.NodeFeatures_known_channel_features();
-               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Create a blank Features with no features set
         */
@@ -433,16 +430,6 @@ export class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a Features with the bits set which are known by the implementation
-        */
-       public static constructor_known(): NodeFeatures {
-               const ret: bigint = bindings.NodeFeatures_known();
-               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
-               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
-               return ret_hu_conv;
-       }
-
        /**
         * Returns true if this `Features` object contains unknown feature flags which are set as
         * \"required\".
index e1efdbb7a8c7e6d14db87bb827eeed4741f097c2..2a23a4a632e97f73d23f8cb52f55ba9cc1bc2833 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeId extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeId_free);
        }
 
index c1661abe35c87cd6973ba4782c0d806ee395682f..77c2d5203b790f4a528ffc98d375d95a708dc8fa 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class NodeInfo extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.NodeInfo_free);
        }
 
@@ -426,7 +433,7 @@ export class NodeInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_lowest_inbound_channel_fees(val: RoutingFees): void {
+       public set_lowest_inbound_channel_fees(val: RoutingFees|null): void {
                bindings.NodeInfo_set_lowest_inbound_channel_fees(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -452,7 +459,7 @@ export class NodeInfo extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_announcement_info(val: NodeAnnouncementInfo): void {
+       public set_announcement_info(val: NodeAnnouncementInfo|null): void {
                bindings.NodeInfo_set_announcement_info(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -484,6 +491,17 @@ export class NodeInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two NodeInfos contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: NodeInfo): boolean {
+               const ret: boolean = bindings.NodeInfo_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
         */
index 40471f6a8e5a219c5fb01476bd59a648cc6a8fa0..6c935996f395557bb1858b78bcc8dccaf9a531fd 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class OnionMessage extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OnionMessage_free);
        }
 
@@ -418,6 +425,17 @@ export class OnionMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two OnionMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: OnionMessage): boolean {
+               const ret: boolean = bindings.OnionMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Read a OnionMessage from a byte array, created by OnionMessage_write
         */
index b9491114f2f53283805769de0a9ad4e373af5281..fe1c5598f08c65e9be388662b15809f33e82749a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../struct
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,10 +394,17 @@ export interface OnionMessageHandlerInterface {
        handle_onion_message(peer_node_id: Uint8Array, msg: OnionMessage): void;
        /**Called when a connection is established with a peer. Can be used to track which peers
         * advertise onion message support and are online.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       peer_connected(their_node_id: Uint8Array, init: Init): void;
+       peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ;
        /**Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
         * drop and refuse to forward onion messages to this peer.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void;
        /**Gets the node feature flags which this handler itself supports. All available handlers are
@@ -408,7 +422,7 @@ export interface OnionMessageHandlerInterface {
 }
 
 class LDKOnionMessageHandlerHolder {
-       held: OnionMessageHandler;
+       held: OnionMessageHandler|null = null;
 }
 
 /**
@@ -416,13 +430,13 @@ class LDKOnionMessageHandlerHolder {
  */
 export class OnionMessageHandler extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKOnionMessageHandler;
+       public bindings_instance: bindings.LDKOnionMessageHandler|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OnionMessageHandler_free);
                this.bindings_instance = null;
        }
@@ -436,10 +450,12 @@ export class OnionMessageHandler extends CommonBase {
                                const msg_hu_conv: OnionMessage = new OnionMessage(null, msg);
                                arg.handle_onion_message(peer_node_id_conv, msg_hu_conv);
                        },
-                       peer_connected (their_node_id: number, init: bigint): void {
+                       peer_connected (their_node_id: number, init: bigint): bigint {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
                                const init_hu_conv: Init = new Init(null, init);
-                               arg.peer_connected(their_node_id_conv, init_hu_conv);
+                               const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
                        },
                        peer_disconnected (their_node_id: number, no_connection_possible: boolean): void {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
@@ -458,13 +474,13 @@ export class OnionMessageHandler extends CommonBase {
                        },
                } as bindings.LDKOnionMessageHandler;
                const onionMessageProvider = OnionMessageProvider.new_impl(onionMessageProvider_impl, );
-               const ptr_idx: [bigint, number] = bindings.LDKOnionMessageHandler_new(structImplementation, onionMessageProvider.instance_idx);
+               const ptr_idx: [bigint, number] = bindings.LDKOnionMessageHandler_new(structImplementation, onionMessageProvider.instance_idx!);
 
                impl_holder.held = new OnionMessageHandler(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(onionMessageProvider);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -478,15 +494,24 @@ export class OnionMessageHandler extends CommonBase {
        /**
         * Called when a connection is established with a peer. Can be used to track which peers
         * advertise onion message support and are online.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public peer_connected(their_node_id: Uint8Array, init: Init): void {
-               bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+       public peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ {
+               const ret: bigint = bindings.OnionMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+               const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, init);
+               return ret_hu_conv;
        }
 
        /**
         * Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
         * drop and refuse to forward onion messages to this peer.
+        * 
+        * Note that in some rare cases this may be called without a corresponding
+        * [`Self::peer_connected`].
         */
        public peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean): void {
                bindings.OnionMessageHandler_peer_disconnected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), no_connection_possible);
index f29757a64afbfc4089b4903df42d191a160e5d06..1e025999f632559949e348c7694f5bf6840cd6c4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,7 +397,7 @@ export interface OnionMessageProviderInterface {
 }
 
 class LDKOnionMessageProviderHolder {
-       held: OnionMessageProvider;
+       held: OnionMessageProvider|null = null;
 }
 
 /**
@@ -398,13 +405,13 @@ class LDKOnionMessageProviderHolder {
  */
 export class OnionMessageProvider extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKOnionMessageProvider;
+       public bindings_instance: bindings.LDKOnionMessageProvider|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OnionMessageProvider_free);
                this.bindings_instance = null;
        }
@@ -425,7 +432,7 @@ export class OnionMessageProvider extends CommonBase {
                impl_holder.held = new OnionMessageProvider(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 10f8816f9ebecdf30885494b482db48537270a9b..ec105e410c21612955f91371a9fcc272f2ab6ce4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
 import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
 /**
  * A sender, receiver and forwarder of onion messages. In upcoming releases, this object will be
  * used to retrieve invoices and fulfill invoice requests from [offers]. Currently, only sending
- * and receiving empty onion messages is supported.
+ * and receiving custom onion messages is supported.
  * 
  * # Example
  * 
@@ -390,9 +397,14 @@ import * as bindings from '../bindings.mjs'
  * # use bitcoin::hashes::_export::_core::time::Duration;
  * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
  * # use lightning::chain::keysinterface::{InMemorySigner, KeysManager, KeysInterface};
+ * # use lightning::ln::msgs::DecodeError;
+ * # use lightning::ln::peer_handler::IgnoringMessageHandler;
  * # use lightning::onion_message::messenger::{Destination, OnionMessenger};
+ * # use lightning::onion_message::packet::CustomOnionMessageContents;
  * # use lightning::onion_message::blinded_route::BlindedRoute;
  * # use lightning::util::logger::{Logger, Record};
+ * # use lightning::util::ser::{Writeable, Writer};
+ * # use lightning::io;
  * # use std::sync::Arc;
  * # struct FakeLogger {};
  * # impl Logger for FakeLogger {
@@ -405,28 +417,43 @@ import * as bindings from '../bindings.mjs'
  * # let node_secret = SecretKey::from_slice(&hex::decode(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
  * # let secp_ctx = Secp256k1::new();
  * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
- * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1,
- * hop_node_id1);
+ * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1, hop_node_id1);
  * # let destination_node_id = hop_node_id1;
- * #
+ * # let your_custom_message_handler = IgnoringMessageHandler {};
  * Create the onion messenger. This must use the same `keys_manager` as is passed to your
  * ChannelManager.
- * let onion_messenger = OnionMessenger::new(&keys_manager, logger);
+ * let onion_messenger = OnionMessenger::new(&keys_manager, logger, your_custom_message_handler);
  * 
- * Send an empty onion message to a node id.
+ * # #[derive(Clone)]
+ * # struct YourCustomMessage {}
+ * impl Writeable for YourCustomMessage {
+ * \tfn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
+ * \t\t# Ok(())
+ * \t\t// Write your custom onion message to `w`
+ * \t}
+ * }
+ * impl CustomOnionMessageContents for YourCustomMessage {
+ * \tfn tlv_type(&self) -> u64 {
+ * \t\t# let your_custom_message_type = 42;
+ * \t\tyour_custom_message_type
+ * \t}
+ * }
+ * Send a custom onion message to a node id.
  * let intermediate_hops = [hop_node_id1, hop_node_id2];
  * let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::Node(destination_node_id), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::Node(destination_node_id), your_custom_message, reply_path);
  * 
  * Create a blinded route to yourself, for someone to send an onion message to.
  * # let your_node_id = hop_node_id1;
  * let hops = [hop_node_id3, hop_node_id4, your_node_id];
  * let blinded_route = BlindedRoute::new(&hops, &keys_manager, &secp_ctx).unwrap();
  * 
- * Send an empty onion message to a blinded route.
+ * Send a custom onion message to a blinded route.
  * # let intermediate_hops = [hop_node_id1, hop_node_id2];
  * let reply_path = None;
- * onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), reply_path);
+ * # let your_custom_message = YourCustomMessage {};
+ * onion_messenger.send_custom_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), your_custom_message, reply_path);
  * ```
  * 
  * [offers]: <https://github.com/lightning/bolts/pull/798>
@@ -434,7 +461,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class OnionMessenger extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OnionMessenger_free);
        }
 
@@ -442,24 +469,26 @@ export class OnionMessenger extends CommonBase {
         * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
         * their respective handlers.
         */
-       public static constructor_new(keys_manager: KeysInterface, logger: Logger): OnionMessenger {
-               const ret: bigint = bindings.OnionMessenger_new(keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger));
+       public static constructor_new(keys_manager: KeysInterface, logger: Logger, custom_handler: CustomOnionMessageHandler): OnionMessenger {
+               const ret: bigint = bindings.OnionMessenger_new(keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), custom_handler == null ? 0n : CommonBase.get_ptr_of(custom_handler));
                const ret_hu_conv: OnionMessenger = new OnionMessenger(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                CommonBase.add_ref_from(ret_hu_conv, keys_manager);
                CommonBase.add_ref_from(ret_hu_conv, logger);
+               CommonBase.add_ref_from(ret_hu_conv, custom_handler);
                return ret_hu_conv;
        }
 
        /**
-        * Send an empty onion message to `destination`, routing it through `intermediate_nodes`.
+        * Send an onion message with contents `message` to `destination`, routing it through `intermediate_nodes`.
         * See [`OnionMessenger`] for example usage.
         * 
         * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public send_onion_message(intermediate_nodes: Uint8Array[], destination: Destination, reply_path: BlindedRoute): Result_NoneSendErrorZ {
-               const ret: bigint = bindings.OnionMessenger_send_onion_message(this.ptr, bindings.encodeUint32Array(intermediate_nodes != null ? intermediate_nodes.map(intermediate_nodes_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(intermediate_nodes_conv_12, 33))) : null), CommonBase.get_ptr_of(destination), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
+       public send_custom_onion_message(intermediate_nodes: Uint8Array[], destination: Destination, msg: CustomOnionMessageContents, reply_path: BlindedRoute|null): Result_NoneSendErrorZ {
+               const ret: bigint = bindings.OnionMessenger_send_custom_onion_message(this.ptr, bindings.encodeUint32Array(intermediate_nodes != null ? intermediate_nodes.map(intermediate_nodes_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(intermediate_nodes_conv_12, 33))) : null), CommonBase.get_ptr_of(destination), msg == null ? 0n : CommonBase.get_ptr_of(msg), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
                const ret_hu_conv: Result_NoneSendErrorZ = Result_NoneSendErrorZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(this, msg);
                CommonBase.add_ref_from(this, reply_path);
                return ret_hu_conv;
        }
index ec465363ed3825c4e389998f8b555a63657049f6..592c028fdee5e0a1af23802ecec7f18c54a84a86 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class OpenChannel extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OpenChannel_free);
        }
 
@@ -686,7 +693,7 @@ export class OpenChannel extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_channel_type(val: ChannelTypeFeatures): void {
+       public set_channel_type(val: ChannelTypeFeatures|null): void {
                bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
@@ -706,6 +713,17 @@ export class OpenChannel extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two OpenChannels contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: OpenChannel): boolean {
+               const ret: boolean = bindings.OpenChannel_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the OpenChannel object into a byte array which can be read by OpenChannel_read
         */
index 55bc25cdfd1c605769cf0c82f4153abe772f5ba4..fe97f5a54ca5d7e43b797108744e37ad2378411c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::chain::Access or not
  */
 export class Option_AccessZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_AccessZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_AccessZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_AccessZ {
                const raw_ty: number = bindings.LDKCOption_AccessZ_ty_from_ptr(ptr);
index 9a855592278288dad6f89962b7481ee245f04035..8cbb52514935bae472bba05432cd7709cd400b61 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::c_types::derived::C2Tuple_u64u64Z or not
  */
 export class Option_C2Tuple_u64u64ZZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_C2Tuple_u64u64ZZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_C2Tuple_u64u64ZZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_C2Tuple_u64u64ZZ {
                const raw_ty: number = bindings.LDKCOption_C2Tuple_u64u64ZZ_ty_from_ptr(ptr);
index 3b4951f26fdcc23fed0aea7d679fcf0c48bc993e..2896c67b0b5b15970fd49839fe4f08eb7d154016 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ or not
  */
 export class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
                const raw_ty: number = bindings.LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_ty_from_ptr(ptr);
index 321a0bace04a2967375ce87be2578b6ec2db3aa2..45dea46476b21b8c2d8a73552f888b93c6d46435 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::c_types::derived::CVec_NetAddressZ or not
  */
 export class Option_CVec_NetAddressZZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_CVec_NetAddressZZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_CVec_NetAddressZZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_CVec_NetAddressZZ {
                const raw_ty: number = bindings.LDKCOption_CVec_NetAddressZZ_ty_from_ptr(ptr);
index 3e76745631fa804f46d5fb07d34e05dd1da568bd..692a82e73436b429ea5d376e177ce8c076f2a9ee 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::util::events::ClosureReason or not
  */
 export class Option_ClosureReasonZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_ClosureReasonZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_ClosureReasonZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_ClosureReasonZ {
                const raw_ty: number = bindings.LDKCOption_ClosureReasonZ_ty_from_ptr(ptr);
diff --git a/ts/structs/Option_CustomOnionMessageContentsZ.mts b/ts/structs/Option_CustomOnionMessageContentsZ.mts
new file mode 100644 (file)
index 0000000..3322931
--- /dev/null
@@ -0,0 +1,459 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+/**
+ * An enum which can either contain a crate::lightning::onion_message::packet::CustomOnionMessageContents or not
+ */
+export class Option_CustomOnionMessageContentsZ extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_CustomOnionMessageContentsZ_free); }
+       /* @internal */
+       public static constr_from_ptr(ptr: bigint): Option_CustomOnionMessageContentsZ {
+               const raw_ty: number = bindings.LDKCOption_CustomOnionMessageContentsZ_ty_from_ptr(ptr);
+               switch (raw_ty) {
+                       case 0: return new Option_CustomOnionMessageContentsZ_Some(ptr);
+                       case 1: return new Option_CustomOnionMessageContentsZ_None(ptr);
+                       default:
+                               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
+               }
+       }
+
+       /**
+        * Constructs a new COption_CustomOnionMessageContentsZ containing a crate::lightning::onion_message::packet::CustomOnionMessageContents
+        */
+       public static constructor_some(o: CustomOnionMessageContents): Option_CustomOnionMessageContentsZ {
+               const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_some(o == null ? 0n : CommonBase.get_ptr_of(o));
+               const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               CommonBase.add_ref_from(ret_hu_conv, o);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_CustomOnionMessageContentsZ containing nothing
+        */
+       public static constructor_none(): Option_CustomOnionMessageContentsZ {
+               const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_none();
+               const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_CustomOnionMessageContentsZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public clone(): Option_CustomOnionMessageContentsZ {
+               const ret: bigint = bindings.COption_CustomOnionMessageContentsZ_clone(this.ptr);
+               const ret_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, this);
+               return ret_hu_conv;
+       }
+
+}
+/** A Option_CustomOnionMessageContentsZ of type Some */
+export class Option_CustomOnionMessageContentsZ_Some extends Option_CustomOnionMessageContentsZ {
+       public some: CustomOnionMessageContents;
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+               const some: bigint = bindings.LDKCOption_CustomOnionMessageContentsZ_Some_get_some(ptr);
+               const ret_hu_conv: CustomOnionMessageContents = new CustomOnionMessageContents(null, some);
+                       CommonBase.add_ref_from(ret_hu_conv, this);
+               this.some = ret_hu_conv;
+       }
+}
+/** A Option_CustomOnionMessageContentsZ of type None */
+export class Option_CustomOnionMessageContentsZ_None extends Option_CustomOnionMessageContentsZ {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
index 60bbf6f25f13beb7d9833fd493b1fef37bc56e53..158a6aaa2fb20c438e21d8d1beb3687db0b1c8c2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::util::events::Event or not
  */
 export class Option_EventZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_EventZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_EventZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_EventZ {
                const raw_ty: number = bindings.LDKCOption_EventZ_ty_from_ptr(ptr);
index 7d782fb1d6e35cdf79edb4948d68dbd76c015ddb..776cc5f3fc5bfa5edb3f8c8f168ae3ac510438a4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::chain::Filter or not
  */
 export class Option_FilterZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_FilterZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_FilterZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_FilterZ {
                const raw_ty: number = bindings.LDKCOption_FilterZ_ty_from_ptr(ptr);
index d82be9661902f1da2d0c1a506b8ffa7ca2d24c39..3600acd3b96b77c2da2a4a57bc3e9c4682661cdd 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::util::events::HTLCDestination or not
  */
 export class Option_HTLCDestinationZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_HTLCDestinationZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_HTLCDestinationZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_HTLCDestinationZ {
                const raw_ty: number = bindings.LDKCOption_HTLCDestinationZ_ty_from_ptr(ptr);
index d16669440b8a694cec1e7601450e46a38eef9950..d9d9e266605a487587b4fe587144d3faae2c9251 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::chain::channelmonitor::MonitorEvent or not
  */
 export class Option_MonitorEventZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_MonitorEventZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_MonitorEventZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_MonitorEventZ {
                const raw_ty: number = bindings.LDKCOption_MonitorEventZ_ty_from_ptr(ptr);
index e6ad0c314ec884603aa7bb422237838e7b2ae430..a4850db769e059add80dff49dc9bb9d46fd72225 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::ln::msgs::NetAddress or not
  */
 export class Option_NetAddressZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_NetAddressZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_NetAddressZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_NetAddressZ {
                const raw_ty: number = bindings.LDKCOption_NetAddressZ_ty_from_ptr(ptr);
index d375e40264de187399c41fe442043e9b4034f830..0945eb0e09148474ccd714f5386945e2bd6ad0f6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::routing::gossip::NetworkUpdate or not
  */
 export class Option_NetworkUpdateZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_NetworkUpdateZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_NetworkUpdateZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_NetworkUpdateZ {
                const raw_ty: number = bindings.LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr);
index 9fb0ff444ea07dd353c8b28f8cca4eda60778e20..1cf20254a5c5a0f2d7dc2593dd25ffea83344f2a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
 import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::c_types::BigEndianScalar or not
  */
 export class Option_ScalarZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_ScalarZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_ScalarZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_ScalarZ {
                const raw_ty: number = bindings.LDKCOption_ScalarZ_ty_from_ptr(ptr);
index a09d25161d5d4d0d20009ac1a22cf7ac0aef7c00..f97e29b2c87aec9db97e1b51a60603dce2b7123b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a crate::lightning::ln::wire::Type or not
  */
 export class Option_TypeZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_TypeZ_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_TypeZ_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_TypeZ {
                const raw_ty: number = bindings.LDKCOption_TypeZ_ty_from_ptr(ptr);
index 57cf11a7a3bf05cd6683031f684d88c070e466f9..9600b1175bf24f009cb0f91476189bc2c93e3d18 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a u16 or not
  */
 export class Option_u16Z extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u16Z_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u16Z_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_u16Z {
                const raw_ty: number = bindings.LDKCOption_u16Z_ty_from_ptr(ptr);
index c0d02b84dcf793bebb801d247fbd7469af04da33..909b53c5c6e299f7245369a400541932f736e669 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a u32 or not
  */
 export class Option_u32Z extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u32Z_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u32Z_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_u32Z {
                const raw_ty: number = bindings.LDKCOption_u32Z_ty_from_ptr(ptr);
index 43768f4ac9cca5f48037bdf4cfee356420af4313..1ed7bf6c60721a141354972a8090a3a39b585784 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An enum which can either contain a u64 or not
  */
 export class Option_u64Z extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.COption_u64Z_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.COption_u64Z_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Option_u64Z {
                const raw_ty: number = bindings.LDKCOption_u64Z_ty_from_ptr(ptr);
index 026017ecae308517cc3064abeb60ecb31f59375c..c7329e2e67754140b0521a304cb828d5a851cb14 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class OutPoint extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.OutPoint_free);
        }
 
index 78104c9a4bac36b3bfce02bef68d501f4c712ce2..35660aa8a30609f05c4b41ef608fc53a6f5df750 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,7 +397,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class P2PGossipSync extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.P2PGossipSync_free);
        }
 
index afa0353b515ec9615d1090c4e787ffa21c06ca10..d295fdc727cf4541607bda9d109d8a4900becf62 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -382,7 +389,7 @@ import * as bindings from '../bindings.mjs'
  * reasons, but should generally result in an \"invalid BOLT11 invoice\" message for the user.
  */
 export class ParseError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ParseError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ParseError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): ParseError {
                const raw_ty: number = bindings.LDKParseError_ty_from_ptr(ptr);
@@ -605,6 +612,15 @@ export class ParseError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ParseErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: ParseError): boolean {
+               const ret: boolean = bindings.ParseError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Get the string representation of a ParseError object
         */
index aa02af01b4953c82dcd67afe060f6217ab6a24d8..8bd2529d61718e8f0373e967870c75843df907ef 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  * like wrong signatures, missing fields etc. could mean that someone tampered with the invoice.
  */
 export class ParseOrSemanticError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.ParseOrSemanticError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.ParseOrSemanticError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): ParseOrSemanticError {
                const raw_ty: number = bindings.LDKParseOrSemanticError_ty_from_ptr(ptr);
@@ -430,6 +437,15 @@ export class ParseOrSemanticError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ParseOrSemanticErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: ParseOrSemanticError): boolean {
+               const ret: boolean = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Get the string representation of a ParseOrSemanticError object
         */
index 3b902179493f25c74d28dba1128f23db74572a32..e388d88d42f67cb5b8ff80cb20705ee7c995931f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PayeePubKey extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PayeePubKey_free);
        }
 
index 7e7c3509ab0f616aa50ae8cab253a16352d4d101..e6d88c5d5933789dcfce8cd44f7b8964dabc255f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -405,7 +412,7 @@ export interface PayerInterface {
 }
 
 class LDKPayerHolder {
-       held: Payer;
+       held: Payer|null = null;
 }
 
 /**
@@ -413,13 +420,13 @@ class LDKPayerHolder {
  */
 export class Payer extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKPayer;
+       public bindings_instance: bindings.LDKPayer|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Payer_free);
                this.bindings_instance = null;
        }
@@ -470,7 +477,7 @@ export class Payer extends CommonBase {
                impl_holder.held = new Payer(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -504,7 +511,7 @@ export class Payer extends CommonBase {
         * 
         * Note that payment_secret (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array): Result_PaymentIdPaymentSendFailureZ {
+       public send_payment(route: Route, payment_hash: Uint8Array, payment_secret: Uint8Array|null): Result_PaymentIdPaymentSendFailureZ {
                const ret: bigint = bindings.Payer_send_payment(this.ptr, route == null ? 0n : CommonBase.get_ptr_of(route), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_secret, 32)));
                const ret_hu_conv: Result_PaymentIdPaymentSendFailureZ = Result_PaymentIdPaymentSendFailureZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, route);
index 0419288ffda8bc52e333c48689381b3c7bbe3ad8..e6e45d61e6c43df2e4542a02865e266cff5bea68 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * An error that may occur when making a payment.
  */
 export class PaymentError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): PaymentError {
                const raw_ty: number = bindings.LDKPaymentError_ty_from_ptr(ptr);
index 86806b6a03c72ba291b15b5f2e26f6ece864e0e6..7cdaa5330fa7461cd84ae0f9023a87cde82f3672 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PaymentParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PaymentParameters_free);
        }
 
@@ -430,7 +437,7 @@ export class PaymentParameters extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_features(val: InvoiceFeatures): void {
+       public set_features(val: InvoiceFeatures|null): void {
                bindings.PaymentParameters_set_features(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
index d919b240c947dc263ff171f447e7e28c09c8de29..20b7cd2acb05188207a937384d5bbd461111dc19 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -382,7 +389,7 @@ import * as bindings from '../bindings.mjs'
  * spontaneous payment or a \"conventional\" lightning payment that's paying an invoice.
  */
 export class PaymentPurpose extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentPurpose_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentPurpose_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): PaymentPurpose {
                const raw_ty: number = bindings.LDKPaymentPurpose_ty_from_ptr(ptr);
index 35a86deb059fca6e25626ce1802723b1dfd4f53a..9af1d62c81c277649fcec3ab74404bd3d0a0f4e1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  * states for more.
  */
 export class PaymentSendFailure extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentSendFailure_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.PaymentSendFailure_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): PaymentSendFailure {
                const raw_ty: number = bindings.LDKPaymentSendFailure_ty_from_ptr(ptr);
index 849220cd4c3abd6c2ad578677ce8df401f4c0af8..612c580a8209bda4a06834ff4b4c5e26db79bc3e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PeerHandleError extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PeerHandleError_free);
        }
 
index 948f37238018ce27244bfb80d1fb630df790189b..8fe58ebc26060fce00f115aff84d630c39aef4a6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -401,7 +408,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PeerManager extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PeerManager_free);
        }
 
@@ -415,7 +422,7 @@ export class PeerManager extends CommonBase {
         * timestamp, however if it is not available a persistent counter that increases once per
         * minute should suffice.
         */
-       public static constructor_new(message_handler_chan_handler_arg: ChannelMessageHandler, message_handler_route_handler_arg: RoutingMessageHandler, message_handler_onion_message_handler_arg: OnionMessageHandler, our_node_secret: Uint8Array, current_time: bigint, ephemeral_random_data: Uint8Array, logger: Logger, custom_message_handler: CustomMessageHandler): PeerManager {
+       public static constructor_new(message_handler_chan_handler_arg: ChannelMessageHandler, message_handler_route_handler_arg: RoutingMessageHandler, message_handler_onion_message_handler_arg: OnionMessageHandler, our_node_secret: Uint8Array, current_time: number, ephemeral_random_data: Uint8Array, logger: Logger, custom_message_handler: CustomMessageHandler): PeerManager {
                const ret: bigint = bindings.PeerManager_new(bindings.MessageHandler_new(message_handler_chan_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_chan_handler_arg), message_handler_route_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_route_handler_arg), message_handler_onion_message_handler_arg == null ? 0n : CommonBase.get_ptr_of(message_handler_onion_message_handler_arg)), bindings.encodeUint8Array(bindings.check_arr_len(our_node_secret, 32)), current_time, bindings.encodeUint8Array(bindings.check_arr_len(ephemeral_random_data, 32)), logger == null ? 0n : CommonBase.get_ptr_of(logger), custom_message_handler == null ? 0n : CommonBase.get_ptr_of(custom_message_handler));
                const ret_hu_conv: PeerManager = new PeerManager(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
index 34eb78f96b4da978659ef9e46e5009c35115f666..ebe8ada4ec7d1c6607dd2f5e09d1b81a65d3bae9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,15 +397,15 @@ export interface PersistInterface {
         * and the stored channel data). Note that you **must** persist every new monitor to disk.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
-        * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         */
-       persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ;
+       persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus;
        /**Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
         * update.
         * 
@@ -425,21 +432,21 @@ export interface PersistInterface {
         * whereas updates are small and `O(1)`.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
         * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
-        * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         * 
         * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ;
+       update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus;
 }
 
 class LDKPersistHolder {
-       held: Persist;
+       held: Persist|null = null;
 }
 
 /**
@@ -448,30 +455,31 @@ class LDKPersistHolder {
  * 
  * Each method can return three possible values:
  * If persistence (including any relevant `fsync()` calls) happens immediately, the
- * implementation should return `Ok(())`, indicating normal channel operation should continue.
+ * implementation should return [`ChannelMonitorUpdateStatus::Completed`], indicating normal
+ * channel operation should continue.
  * If persistence happens asynchronously, implementations should first ensure the
  * [`ChannelMonitor`] or [`ChannelMonitorUpdate`] are written durably to disk, and then return
- * `Err(ChannelMonitorUpdateErr::TemporaryFailure)` while the update continues in the
- * background. Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be
- * called with the corresponding [`MonitorUpdateId`].
+ * [`ChannelMonitorUpdateStatus::InProgress`] while the update continues in the background.
+ * Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be called with
+ * the corresponding [`MonitorUpdateId`].
  * 
  * Note that unlike the direct [`chain::Watch`] interface,
  * [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
  * 
  * If persistence fails for some reason, implementations should return
- * `Err(ChannelMonitorUpdateErr::PermanentFailure)`, in which case the channel will likely be
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`], in which case the channel will likely be
  * closed without broadcasting the latest state. See
- * [`ChannelMonitorUpdateErr::PermanentFailure`] for more details.
+ * [`ChannelMonitorUpdateStatus::PermanentFailure`] for more details.
  */
 export class Persist extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKPersist;
+       public bindings_instance: bindings.LDKPersist|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Persist_free);
                this.bindings_instance = null;
        }
@@ -480,26 +488,24 @@ export class Persist extends CommonBase {
        public static new_impl(arg: PersistInterface): Persist {
                const impl_holder: LDKPersistHolder = new LDKPersistHolder();
                let structImplementation = {
-                       persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): bigint {
+                       persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
                                const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
                                CommonBase.add_ref_from(channel_id_hu_conv, this);
                                const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data);
                                const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
                                CommonBase.add_ref_from(update_id_hu_conv, this);
-                               const ret: Result_NoneChannelMonitorUpdateErrZ = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
-                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
-                               return result;
+                               const ret: ChannelMonitorUpdateStatus = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
+                               return ret;
                        },
-                       update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): bigint {
+                       update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
                                const channel_id_hu_conv: OutPoint = new OutPoint(null, channel_id);
                                CommonBase.add_ref_from(channel_id_hu_conv, this);
                                const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
                                const data_hu_conv: ChannelMonitor = new ChannelMonitor(null, data);
                                const update_id_hu_conv: MonitorUpdateId = new MonitorUpdateId(null, update_id);
                                CommonBase.add_ref_from(update_id_hu_conv, this);
-                               const ret: Result_NoneChannelMonitorUpdateErrZ = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
-                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
-                               return result;
+                               const ret: ChannelMonitorUpdateStatus = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
+                               return ret;
                        },
                } as bindings.LDKPersist;
                const ptr_idx: [bigint, number] = bindings.LDKPersist_new(structImplementation);
@@ -507,7 +513,7 @@ export class Persist extends CommonBase {
                impl_holder.held = new Persist(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -519,21 +525,20 @@ export class Persist extends CommonBase {
         * and the stored channel data). Note that you **must** persist every new monitor to disk.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
-        * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         */
-       public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+       public persist_new_channel(channel_id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
+               const ret: ChannelMonitorUpdateStatus = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
                CommonBase.add_ref_from(this, channel_id);
                CommonBase.add_ref_from(this, data);
                CommonBase.add_ref_from(this, update_id);
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
@@ -563,24 +568,23 @@ export class Persist extends CommonBase {
         * whereas updates are small and `O(1)`.
         * 
         * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-        * if you return [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * if you return [`ChannelMonitorUpdateStatus::InProgress`].
         * 
         * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
         * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
-        * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+        * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
         * 
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         * 
         * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+       public update_persisted_channel(channel_id: OutPoint, update: ChannelMonitorUpdate|null, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
+               const ret: ChannelMonitorUpdateStatus = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0n : CommonBase.get_ptr_of(channel_id), update == null ? 0n : CommonBase.get_ptr_of(update), data == null ? 0n : CommonBase.get_ptr_of(data), update_id == null ? 0n : CommonBase.get_ptr_of(update_id));
                CommonBase.add_ref_from(this, channel_id);
                CommonBase.add_ref_from(this, update);
                CommonBase.add_ref_from(this, data);
                CommonBase.add_ref_from(this, update_id);
-               return ret_hu_conv;
+               return ret;
        }
 
 }
index 0439d7382d38fbbe42be2444839c7ce3538320f4..856c4be9f84701b3b7b79645843332794f6c6a0c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -394,7 +401,7 @@ export interface PersisterInterface {
 }
 
 class LDKPersisterHolder {
-       held: Persister;
+       held: Persister|null = null;
 }
 
 /**
@@ -402,13 +409,13 @@ class LDKPersisterHolder {
  */
 export class Persister extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKPersister;
+       public bindings_instance: bindings.LDKPersister|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Persister_free);
                this.bindings_instance = null;
        }
@@ -442,7 +449,7 @@ export class Persister extends CommonBase {
                impl_holder.held = new Persister(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index f9c630240d25701f7cb0ba9238bcbb6404341f4b..578dc56d3c4de5acfb071d132e04a3ab349ea3ec 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -397,7 +404,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PhantomKeysManager extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PhantomKeysManager_free);
        }
 
index 4633146e1dd815bcdc0ccf3ed0cfc2da9edc560a..97f58ec5ce2820c0f41af65a8809fcf903f4a6a0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PhantomRouteHints extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PhantomRouteHints_free);
        }
 
index be02be217fd067f5c8b3c5d65d1bb59bb644b080..496f6669c91bb099811f5bd8dfbffdc6a835bf14 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Ping extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Ping_free);
        }
 
@@ -444,6 +451,17 @@ export class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Pings contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: Ping): boolean {
+               const ret: boolean = bindings.Ping_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the Ping object into a byte array which can be read by Ping_read
         */
index 5b9c38e134b68e97bb0b72912aa80b702866475d..d8405c953381b2de2f580d7047152ac35fdcb757 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Pong extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Pong_free);
        }
 
@@ -429,6 +436,17 @@ export class Pong extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Pongs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: Pong): boolean {
+               const ret: boolean = bindings.Pong_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the Pong object into a byte array which can be read by Pong_read
         */
index 600fef35770cca517ede29cadbadcea4770cb3f4..befc30ef2617d30557fd0b882824941c9d60f235 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PositiveTimestamp extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PositiveTimestamp_free);
        }
 
@@ -441,6 +448,8 @@ export class PositiveTimestamp extends CommonBase {
         * Creates a `PositiveTimestamp` from a [`Duration`] since the Unix epoch in the range
         * `0..=MAX_TIMESTAMP`.
         * 
+        * Note that the subsecond part is dropped as it is not representable in BOLT 11 invoices.
+        * 
         * Otherwise, returns a [`CreationError::TimestampOutOfBounds`].
         */
        public static constructor_from_duration_since_epoch(duration: bigint): Result_PositiveTimestampCreationErrorZ {
index 20a53868ba2ad436e59a8f38e822625093280a2e..161120cca21dd0ab6773747969a7fae52b3389bb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class PrivateRoute extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.PrivateRoute_free);
        }
 
index 72e35c86213a4ba1b6ef1ee9d264d0e6603ec525..90263715190b7ae191d41a560a4f733a54ebe8b1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,19 +388,28 @@ import * as bindings from '../bindings.mjs'
 /**
  * [`Score`] implementation using channel success probability distributions.
  * 
- * Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
- * and Stefan Richter [[1]]. Given the uncertainty of channel liquidity balances, probability
- * distributions are defined based on knowledge learned from successful and unsuccessful attempts.
- * Then the negative `log10` of the success probability is used to determine the cost of routing a
- * specific HTLC amount through a channel.
+ * Channels are tracked with upper and lower liquidity bounds - when an HTLC fails at a channel,
+ * we learn that the upper-bound on the available liquidity is lower than the amount of the HTLC.
+ * When a payment is forwarded through a channel (but fails later in the route), we learn the
+ * lower-bound on the channel's available liquidity must be at least the value of the HTLC.
  * 
- * Knowledge about channel liquidity balances takes the form of upper and lower bounds on the
- * possible liquidity. Certainty of the bounds is decreased over time using a decay function. See
- * [`ProbabilisticScoringParameters`] for details.
+ * These bounds are then used to determine a success probability using the formula from
+ * Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
+ * and Stefan Richter [[1]] (i.e. `(upper_bound - payment_amount) / (upper_bound - lower_bound)`).
  * 
- * Since the scorer aims to learn the current channel liquidity balances, it works best for nodes
- * with high payment volume or that actively probe the [`NetworkGraph`]. Nodes with low payment
- * volume are more likely to experience failed payment paths, which would need to be retried.
+ * This probability is combined with the [`liquidity_penalty_multiplier_msat`] and
+ * [`liquidity_penalty_amount_multiplier_msat`] parameters to calculate a concrete penalty in
+ * milli-satoshis. The penalties, when added across all hops, have the property of being linear in
+ * terms of the entire path's success probability. This allows the router to directly compare
+ * penalties for different paths. See the documentation of those parameters for the exact formulas.
+ * 
+ * The liquidity bounds are decayed by halving them every [`liquidity_offset_half_life`].
+ * 
+ * Further, we track the history of our upper and lower liquidity bounds for each channel,
+ * allowing us to assign a second penalty (using [`historical_liquidity_penalty_multiplier_msat`]
+ * and [`historical_liquidity_penalty_amount_multiplier_msat`]) based on the same probability
+ * formula, but using the history of a channel rather than our latest estimates for the liquidity
+ * bounds.
  * 
  * # Note
  * 
@@ -401,10 +417,15 @@ import * as bindings from '../bindings.mjs'
  * behavior.
  * 
  * [1]: https://arxiv.org/abs/2107.05322
+ * [`liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::liquidity_penalty_amount_multiplier_msat
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringParameters::liquidity_offset_half_life
+ * [`historical_liquidity_penalty_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_multiplier_msat
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringParameters::historical_liquidity_penalty_amount_multiplier_msat
  */
 export class ProbabilisticScorer extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ProbabilisticScorer_free);
        }
 
index 6793fbe4a44b047f1487d67b6c05fea5c128138d..c46a7a0bcdebf9e324b8c8661eca77289737b6db 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor
 import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -389,7 +396,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ProbabilisticScoringParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ProbabilisticScoringParameters_free);
        }
 
@@ -451,7 +458,8 @@ export class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with the negative `log10` of the channel's success
-        * probability for a payment to determine the liquidity penalty.
+        * probability for a payment, as determined by our latest estimates of the channel's
+        * liquidity, to determine the liquidity penalty.
         * 
         * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
         * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
@@ -460,7 +468,9 @@ export class ProbabilisticScoringParameters extends CommonBase {
         * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
         * result in a `u64::max_value` penalty, however.
         * 
-        * Default value: 40,000 msat
+        * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+        * 
+        * Default value: 30,000 msat
         * 
         * [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
         */
@@ -471,7 +481,8 @@ export class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with the negative `log10` of the channel's success
-        * probability for a payment to determine the liquidity penalty.
+        * probability for a payment, as determined by our latest estimates of the channel's
+        * liquidity, to determine the liquidity penalty.
         * 
         * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
         * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
@@ -480,7 +491,9 @@ export class ProbabilisticScoringParameters extends CommonBase {
         * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
         * result in a `u64::max_value` penalty, however.
         * 
-        * Default value: 40,000 msat
+        * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+        * 
+        * Default value: 30,000 msat
         * 
         * [`liquidity_offset_half_life`]: Self::liquidity_offset_half_life
         */
@@ -489,14 +502,20 @@ export class ProbabilisticScoringParameters extends CommonBase {
        }
 
        /**
-        * The time required to elapse before any knowledge learned about channel liquidity balances is
-        * cut in half.
+        * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+        * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+        * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+        * capacity.
         * 
-        * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
-        * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
-        * the certainty of the channel liquidity balance.
+        * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+        * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+        * struct documentation for more info on the way the liquidity bounds are used.
         * 
-        * Default value: 1 hour
+        * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+        * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+        * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+        * 
+        * Default value: 6 hours
         * 
         * # Note
         * 
@@ -509,14 +528,20 @@ export class ProbabilisticScoringParameters extends CommonBase {
        }
 
        /**
-        * The time required to elapse before any knowledge learned about channel liquidity balances is
-        * cut in half.
+        * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+        * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+        * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+        * capacity.
+        * 
+        * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+        * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+        * struct documentation for more info on the way the liquidity bounds are used.
         * 
-        * The bounds are defined in terms of offsets and are initially zero. Increasing the offsets
-        * gives tighter bounds on the channel liquidity balance. Thus, halving the offsets decreases
-        * the certainty of the channel liquidity balance.
+        * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+        * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+        * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
         * 
-        * Default value: 1 hour
+        * Default value: 6 hours
         * 
         * # Note
         * 
@@ -529,7 +554,8 @@ export class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with a payment amount and the negative `log10` of the
-        * channel's success probability for the payment to determine the amount penalty.
+        * channel's success probability for the payment, as determined by our latest estimates of the
+        * channel's liquidity, to determine the amount penalty.
         * 
         * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
         * fees plus penalty) for large payments. The penalty is computed as the product of this
@@ -544,7 +570,7 @@ export class ProbabilisticScoringParameters extends CommonBase {
         * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
         * fall below `1`.
         * 
-        * Default value: 256 msat
+        * Default value: 192 msat
         */
        public get_liquidity_penalty_amount_multiplier_msat(): bigint {
                const ret: bigint = bindings.ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this.ptr);
@@ -553,7 +579,8 @@ export class ProbabilisticScoringParameters extends CommonBase {
 
        /**
         * A multiplier used in conjunction with a payment amount and the negative `log10` of the
-        * channel's success probability for the payment to determine the amount penalty.
+        * channel's success probability for the payment, as determined by our latest estimates of the
+        * channel's liquidity, to determine the amount penalty.
         * 
         * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
         * fees plus penalty) for large payments. The penalty is computed as the product of this
@@ -568,12 +595,131 @@ export class ProbabilisticScoringParameters extends CommonBase {
         * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
         * fall below `1`.
         * 
-        * Default value: 256 msat
+        * Default value: 192 msat
         */
        public set_liquidity_penalty_amount_multiplier_msat(val: bigint): void {
                bindings.ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
        }
 
+       /**
+        * A multiplier used in conjunction with the negative `log10` of the channel's success
+        * probability for the payment, as determined based on the history of our estimates of the
+        * channel's available liquidity, to determine a penalty.
+        * 
+        * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+        * only our latest estimate for the current liquidity available in the channel, it estimates
+        * success probability based on the estimated liquidity available in the channel through
+        * history. Specifically, every time we update our liquidity bounds on a given channel, we
+        * track which of several buckets those bounds fall into, exponentially decaying the
+        * probability of each bucket as new samples are added.
+        * 
+        * Default value: 10,000 msat
+        * 
+        * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+        */
+       public get_historical_liquidity_penalty_multiplier_msat(): bigint {
+               const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this.ptr);
+               return ret;
+       }
+
+       /**
+        * A multiplier used in conjunction with the negative `log10` of the channel's success
+        * probability for the payment, as determined based on the history of our estimates of the
+        * channel's available liquidity, to determine a penalty.
+        * 
+        * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+        * only our latest estimate for the current liquidity available in the channel, it estimates
+        * success probability based on the estimated liquidity available in the channel through
+        * history. Specifically, every time we update our liquidity bounds on a given channel, we
+        * track which of several buckets those bounds fall into, exponentially decaying the
+        * probability of each bucket as new samples are added.
+        * 
+        * Default value: 10,000 msat
+        * 
+        * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+        */
+       public set_historical_liquidity_penalty_multiplier_msat(val: bigint): void {
+               bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this.ptr, val);
+       }
+
+       /**
+        * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+        * channel's success probability for the payment, as determined based on the history of our
+        * estimates of the channel's available liquidity, to determine a penalty.
+        * 
+        * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+        * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+        * of the payment amount, weighted by the negative `log10` of the success probability.
+        * 
+        * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+        * of using only our latest estimate for the current liquidity available in the channel, it
+        * estimates success probability based on the estimated liquidity available in the channel
+        * through history. Specifically, every time we update our liquidity bounds on a given
+        * channel, we track which of several buckets those bounds fall into, exponentially decaying
+        * the probability of each bucket as new samples are added.
+        * 
+        * Default value: 64 msat
+        * 
+        * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+        */
+       public get_historical_liquidity_penalty_amount_multiplier_msat(): bigint {
+               const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this.ptr);
+               return ret;
+       }
+
+       /**
+        * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+        * channel's success probability for the payment, as determined based on the history of our
+        * estimates of the channel's available liquidity, to determine a penalty.
+        * 
+        * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+        * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
+        * of the payment amount, weighted by the negative `log10` of the success probability.
+        * 
+        * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+        * of using only our latest estimate for the current liquidity available in the channel, it
+        * estimates success probability based on the estimated liquidity available in the channel
+        * through history. Specifically, every time we update our liquidity bounds on a given
+        * channel, we track which of several buckets those bounds fall into, exponentially decaying
+        * the probability of each bucket as new samples are added.
+        * 
+        * Default value: 64 msat
+        * 
+        * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+        */
+       public set_historical_liquidity_penalty_amount_multiplier_msat(val: bigint): void {
+               bindings.ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
+       }
+
+       /**
+        * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+        * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+        * seen a liquidity estimate update for this amount of time, the historical datapoints are
+        * decayed by half.
+        * 
+        * Note that after 16 or more half lives all historical data will be completely gone.
+        * 
+        * Default value: 14 days
+        */
+       public get_historical_no_updates_half_life(): bigint {
+               const ret: bigint = bindings.ProbabilisticScoringParameters_get_historical_no_updates_half_life(this.ptr);
+               return ret;
+       }
+
+       /**
+        * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+        * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+        * seen a liquidity estimate update for this amount of time, the historical datapoints are
+        * decayed by half.
+        * 
+        * Note that after 16 or more half lives all historical data will be completely gone.
+        * 
+        * Default value: 14 days
+        */
+       public set_historical_no_updates_half_life(val: bigint): void {
+               bindings.ProbabilisticScoringParameters_set_historical_no_updates_half_life(this.ptr, val);
+       }
+
        /**
         * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
         * channel's capacity, which makes us prefer nodes with a smaller `htlc_maximum_msat`. We
index b20952d6b9a498fe4cada43659a558a389864d89..1246cab0578f5d111d6c98eb1c8fd8b743758b47 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class QueryChannelRange extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.QueryChannelRange_free);
        }
 
@@ -461,6 +468,17 @@ export class QueryChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two QueryChannelRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: QueryChannelRange): boolean {
+               const ret: boolean = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * \n\t * Calculates the overflow safe ending block height for the query.\n\t * Overflow returns `0xffffffff`, otherwise returns `first_blocknum + number_of_blocks`\n\t
         */
index 71d62f01532344bb0eb00f980c7b40fcdde90e98..5fa89fe9cd413fec2b7ede9792e21151c9534d0a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -390,7 +397,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class QueryShortChannelIds extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.QueryShortChannelIds_free);
        }
 
@@ -453,6 +460,17 @@ export class QueryShortChannelIds extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two QueryShortChannelIdss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: QueryShortChannelIds): boolean {
+               const ret: boolean = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Read a QueryShortChannelIds from a byte array, created by QueryShortChannelIds_write
         */
diff --git a/ts/structs/RapidGossipSync.mts b/ts/structs/RapidGossipSync.mts
new file mode 100644 (file)
index 0000000..fb973f2
--- /dev/null
@@ -0,0 +1,434 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+/**
+ * The main Rapid Gossip Sync object.
+ * 
+ * See [crate-level documentation] for usage.
+ * 
+ * [crate-level documentation]: crate
+ */
+export class RapidGossipSync extends CommonBase {
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.RapidGossipSync_free);
+       }
+
+       /**
+        * Instantiate a new [`RapidGossipSync`] instance.
+        */
+       public static constructor_new(network_graph: NetworkGraph): RapidGossipSync {
+               const ret: bigint = bindings.RapidGossipSync_new(network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph));
+               const ret_hu_conv: RapidGossipSync = new RapidGossipSync(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               CommonBase.add_ref_from(ret_hu_conv, network_graph);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Update network graph from binary data.
+        * Returns the last sync timestamp to be used the next time rapid sync data is queried.
+        * 
+        * `network_graph`: network graph to be updated
+        * 
+        * `update_data`: `&[u8]` binary stream that comprises the update data
+        */
+       public update_network_graph(update_data: Uint8Array): Result_u32GraphSyncErrorZ {
+               const ret: bigint = bindings.RapidGossipSync_update_network_graph(this.ptr, bindings.encodeUint8Array(update_data));
+               const ret_hu_conv: Result_u32GraphSyncErrorZ = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Returns whether a rapid gossip sync has completed at least once.
+        */
+       public is_initial_sync_complete(): boolean {
+               const ret: boolean = bindings.RapidGossipSync_is_initial_sync_complete(this.ptr);
+               return ret;
+       }
+
+}
index 4b022d52b3f57ed82be76a10d6c21b22304dc7ac..8569a53f4ba53cb94440f8d8627082d6fcf3df5c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
 import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RawDataPart extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RawDataPart_free);
        }
 
index 581ca6b6654e63441d2b38e09717f93ede9cceb4..ece214db7b84ced6bb3d6559c4ac8e69c93bf75a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RawInvoice extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RawInvoice_free);
        }
 
index f6bfe5264a82c5c3a5be4e99e5a0ce1a5b6024d1..2c44965254ae584c7bce0a953ecbaa0c2e4f95ca 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ReadOnlyNetworkGraph extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, () => { throw new Error("Locks must be manually freed with free()"); });
        }
        /** Releases this lock */
index 83f528986eb6e3118466cc32a5a623202b7c8a26..2ed3165f9da458705c83a49fe7fb112926be03f3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Record extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Record_free);
        }
 
index 203bde52dee56085624634c2c421f110c3f5e122..fa2e0a8db01cc9b314c49e7a9ca9a1cbea4c382f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -389,7 +396,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ReplyChannelRange extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ReplyChannelRange_free);
        }
 
@@ -497,6 +504,17 @@ export class ReplyChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ReplyChannelRanges contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ReplyChannelRange): boolean {
+               const ret: boolean = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Read a ReplyChannelRange from a byte array, created by ReplyChannelRange_write
         */
index 6115d1a8176647caa327da8ba669a41683276814..d6f2a8932ae155ee4e68da14807eb0f0e7ae6c34 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ReplyShortChannelIdsEnd extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ReplyShortChannelIdsEnd_free);
        }
 
@@ -448,6 +455,17 @@ export class ReplyShortChannelIdsEnd extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ReplyShortChannelIdsEnds contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ReplyShortChannelIdsEnd): boolean {
+               const ret: boolean = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
         */
index 37f3b85cb208297643039e193fc7705f56585862..159efdb6003284053f47d65845ba3e99609a0e2e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_AcceptChannelDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_AcceptChannelDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_AcceptChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_AcceptChannelDecodeErrorZ {
-               const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_AcceptChannelDecodeErrorZ = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_AcceptChannelDecodeErrorZ_OK extends Result_AcceptChannelDec
        public res: AcceptChannel;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: AcceptChannel = new AcceptChannel(null, res);
@@ -451,10 +457,10 @@ export class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_AcceptChannelDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index dc719c83b6cfffe9c08ea48fd8d2ca5a811efa3b..6a280dbc04087afa57c2c9ec4c7cb9a6e3bf2ec3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_AnnouncementSignaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_AnnouncementSignaturesDecodeErrorZ = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_AnnouncementSignaturesDecodeErrorZ_OK extends Result_Announc
        public res: AnnouncementSignatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, res);
@@ -451,10 +457,10 @@ export class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_Announ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index cd046a52fa419c13dd9211a6cf97d1ea3bec5604..22c77ce46b956da2f139cf9408053e559071da2e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_BlindedHopDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_BlindedHopDecodeErrorZ_free);
        }
        /* @internal */
@@ -413,9 +420,8 @@ export class Result_BlindedHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedHopDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_BlindedHopDecodeErrorZ {
-               const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_BlindedHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_BlindedHopDecodeErrorZ = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -432,7 +438,7 @@ export class Result_BlindedHopDecodeErrorZ_OK extends Result_BlindedHopDecodeErr
        public res: BlindedHop;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_BlindedHopDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: BlindedHop = new BlindedHop(null, res);
@@ -444,10 +450,10 @@ export class Result_BlindedHopDecodeErrorZ_Err extends Result_BlindedHopDecodeEr
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_BlindedHopDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 80f33235a17769df1a449bf4d798ea71d4014b2f..dd49e93de485c9d58ff92f8fc9e02b601c4849d1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_BlindedRouteDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_BlindedRouteDecodeErrorZ_free);
        }
        /* @internal */
@@ -413,9 +420,8 @@ export class Result_BlindedRouteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedRouteDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_BlindedRouteDecodeErrorZ {
-               const ret: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_BlindedRouteDecodeErrorZ = Result_BlindedRouteDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -432,7 +438,7 @@ export class Result_BlindedRouteDecodeErrorZ_OK extends Result_BlindedRouteDecod
        public res: BlindedRoute;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: BlindedRoute = new BlindedRoute(null, res);
@@ -444,10 +450,10 @@ export class Result_BlindedRouteDecodeErrorZ_Err extends Result_BlindedRouteDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_BlindedRouteDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 0ea65d5317997ff3b77bfafbeee18348b30dc9ff..1f0560080c3a83c7a666e1753e0aabc76b89de0a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_BlindedRouteNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_BlindedRouteNoneZ_free);
        }
        /* @internal */
@@ -431,7 +438,7 @@ export class Result_BlindedRouteNoneZ_OK extends Result_BlindedRouteNoneZ {
        public res: BlindedRoute;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_BlindedRouteNoneZ_get_ok(ptr);
                const res_hu_conv: BlindedRoute = new BlindedRoute(null, res);
@@ -442,7 +449,7 @@ export class Result_BlindedRouteNoneZ_OK extends Result_BlindedRouteNoneZ {
 export class Result_BlindedRouteNoneZ_Err extends Result_BlindedRouteNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index ff7316e7af7b388c88e815e738f23523a94abd55..1ce74c65e4c8c8e7ab37db97ebc11ce210c371b7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_BuiltCommitmentTransactionDecodeErrorZ {
-               const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_BuiltCommitmentTransactionDecodeErrorZ = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_BuiltCommitmentTransactionDecodeErrorZ_OK extends Result_Bui
        public res: BuiltCommitmentTransaction;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, res);
@@ -451,10 +457,10 @@ export class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_Bu
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 0a3a0c44bef43f48849091a2dccf9e4f4007501e..bd26d509597e61b59d486a039efc16060249e3fa 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
         * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -423,7 +429,7 @@ export class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK extends Resu
        public res: TwoTuple_BlockHashChannelManagerZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_BlockHashChannelManagerZ = new TwoTuple_BlockHashChannelManagerZ(null, res);
@@ -435,10 +441,10 @@ export class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_Err extends Res
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 6c6e81efb9026d6400810921cf4db3738689440c..4892c3e912e0e46ecc153089ef39076ebf782774 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidC
 import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
         * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK extends Resu
        public res: TwoTuple_BlockHashChannelMonitorZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_BlockHashChannelMonitorZ = new TwoTuple_BlockHashChannelMonitorZ(null, res);
@@ -450,10 +456,10 @@ export class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_Err extends Res
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 9760d7f6eed66d55cc0352d97c9de4c7102355ca..01d61cacd1d7416b3c076f9b4f2577f3e7855a76 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_OK extends
        public res: TwoTuple_PaymentHashPaymentIdZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_PaymentHashPaymentIdZ = new TwoTuple_PaymentHashPaymentIdZ(null, res);
@@ -449,7 +456,7 @@ export class Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_Err extends
        public err: PaymentSendFailure;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(ptr);
                const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
index fb6de433617cad5142f3742c4b37845c20fd3ed3..c3f404ddfc643c8c717044a62c0462aee5d901e0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_OK extends Result
        public res: TwoTuple_PaymentHashPaymentSecretZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_PaymentHashPaymentSecretZ = new TwoTuple_PaymentHashPaymentSecretZ(null, res);
@@ -449,7 +456,7 @@ export class Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_Err extends Resul
        public err: APIError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(ptr);
                const err_hu_conv: APIError = APIError.constr_from_ptr(err);
index 09c137fe3e8739bd0035da0a796c0c3bec380935..09f6db4691b8946759ca383c2010594b709dba3b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ_OK extends Result_C2T
        public res: TwoTuple_PaymentHashPaymentSecretZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_PaymentHashPaymentSecretZ = new TwoTuple_PaymentHashPaymentSecretZ(null, res);
@@ -448,7 +455,7 @@ export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ_OK extends Result_C2T
 export class Result_C2Tuple_PaymentHashPaymentSecretZNoneZ_Err extends Result_C2Tuple_PaymentHashPaymentSecretZNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 07077ad03b948a4605336a6aa94b243d25bb8c1d..aa433aa513d297a1f7476e78a2a8cfeebf271efb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2T
        public res: TwoTuple_SignatureCVec_SignatureZZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_SignatureCVec_SignatureZZ = new TwoTuple_SignatureCVec_SignatureZZ(null, res);
@@ -448,7 +455,7 @@ export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK extends Result_C2T
 export class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_Err extends Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 693afeb12b6eb6044908152c6cf91e1e6ee14cad..6347b3094869b66f724e180bb03d23ca1fb11b71 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result
 import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_C2Tuple_SignatureSignatureZNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_C2Tuple_SignatureSignatureZNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_C2Tuple_SignatureSignatureZNoneZ_OK extends Result_C2Tuple_S
        public res: TwoTuple_SignatureSignatureZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_C2Tuple_SignatureSignatureZNoneZ_get_ok(ptr);
                const res_hu_conv: TwoTuple_SignatureSignatureZ = new TwoTuple_SignatureSignatureZ(null, res);
@@ -448,7 +455,7 @@ export class Result_C2Tuple_SignatureSignatureZNoneZ_OK extends Result_C2Tuple_S
 export class Result_C2Tuple_SignatureSignatureZNoneZ_Err extends Result_C2Tuple_SignatureSignatureZNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index c63009a322e5a9b2725cbfe17246ffddad280541..5b7bf50989d170aa62c58506427005155da760b9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_ClosureReasonZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_ClosureReasonZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_ClosureReasonZDecodeErrorZ = Result_COption_ClosureReasonZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_ClosureReasonZDecodeErrorZ_OK extends Result_COption
        public res: Option_ClosureReasonZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_ClosureReasonZ = Option_ClosureReasonZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_ClosureReasonZDecodeErrorZ_Err extends Result_COptio
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_ClosureReasonZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
diff --git a/ts/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mts b/ts/structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mts
new file mode 100644 (file)
index 0000000..927feb7
--- /dev/null
@@ -0,0 +1,466 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free);
+       }
+       /* @internal */
+       public static constr_from_ptr(ptr: bigint): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               if (bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the success state.
+        */
+       public static constructor_ok(o: Option_CustomOnionMessageContentsZ): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(CommonBase.get_ptr_of(o));
+               const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the error state.
+        */
+       public static constructor_err(e: DecodeError): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
+               const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public is_ok(): boolean {
+               const ret: boolean = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(this.ptr);
+               return ret;
+       }
+
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public clone(): Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+               const ret: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_clone(this.ptr);
+               const ret_hu_conv: Result_COption_CustomOnionMessageContentsZDecodeErrorZ = Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_OK extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+       public res: Option_CustomOnionMessageContentsZ;
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+               const res: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_ok(ptr);
+               const res_hu_conv: Option_CustomOnionMessageContentsZ = Option_CustomOnionMessageContentsZ.constr_from_ptr(res);
+               CommonBase.add_ref_from(res_hu_conv, this);
+               this.res = res_hu_conv;
+       }
+}
+export class Result_COption_CustomOnionMessageContentsZDecodeErrorZ_Err extends Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+       public err: DecodeError;
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+               const err: bigint = bindings.CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_get_err(ptr);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
+               CommonBase.add_ref_from(err_hu_conv, this);
+               this.err = err_hu_conv;
+       }
+}
\ No newline at end of file
index ec6672f3af1460bc20248dac46de3c61a7ce38dc..661c5ce9673b4582847c2a0a558451f7581c7d66 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_EventZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_EventZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_EventZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_EventZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_EventZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_EventZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_EventZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_EventZDecodeErrorZ = Result_COption_EventZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_EventZDecodeErrorZ_OK extends Result_COption_EventZD
        public res: Option_EventZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_EventZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_EventZ = Option_EventZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_EventZDecodeErrorZ_Err extends Result_COption_EventZ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_EventZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index abde0954ae1f1676617862282b95c4f8ee1c85fd..583329d15e2a0de6401b61b59f58e35390a7e999 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_HTLCDestinationZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_HTLCDestinationZDecodeErrorZ = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_HTLCDestinationZDecodeErrorZ_OK extends Result_COpti
        public res: Option_HTLCDestinationZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_HTLCDestinationZ = Option_HTLCDestinationZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_HTLCDestinationZDecodeErrorZ_Err extends Result_COpt
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 86b126da58df2f9db37a88b769625ca8ff19858f..29bbe27da757993fff127723d32f104c5f67b2b0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_MonitorEventZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_MonitorEventZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_MonitorEventZDecodeErrorZ = Result_COption_MonitorEventZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_MonitorEventZDecodeErrorZ_OK extends Result_COption_
        public res: Option_MonitorEventZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_MonitorEventZ = Option_MonitorEventZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_MonitorEventZDecodeErrorZ_Err extends Result_COption
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_MonitorEventZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 7467f0554ed5b2ece961b0f1d28b4e9cf24305d2..085978f31a74c33ea15f6b2ecec2ebde14af3bf8 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_NetworkUpdateZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_NetworkUpdateZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_NetworkUpdateZDecodeErrorZ = Result_COption_NetworkUpdateZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_NetworkUpdateZDecodeErrorZ_OK extends Result_COption
        public res: Option_NetworkUpdateZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_NetworkUpdateZ = Option_NetworkUpdateZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_NetworkUpdateZDecodeErrorZ_Err extends Result_COptio
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 0988d74ef791296f3d62304e320d8e693c0835b7..a3f36bf14a736c66e68778764abc09d1ec902fe9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_COption_TypeZDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_COption_TypeZDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_COption_TypeZDecodeErrorZ extends CommonBase {
         * Creates a new CResult_COption_TypeZDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_COption_TypeZDecodeErrorZ {
-               const ret: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_COption_TypeZDecodeErrorZ = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_COption_TypeZDecodeErrorZ_OK extends Result_COption_TypeZDec
        public res: Option_TypeZ;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Option_TypeZ = Option_TypeZ.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_COption_TypeZDecodeErrorZ_Err extends Result_COption_TypeZDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_COption_TypeZDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index fd4335d4014518bf18c212040632ff20c27e0117..1c9d3b00e234c9f6d075caac6c49e12fe4a0e24e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CVec_CVec_u8ZZNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_CVec_CVec_u8ZZNoneZ_OK extends Result_CVec_CVec_u8ZZNoneZ {
        public res: Uint8Array[];
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
                const res_conv_12_len: number = bindings.getArrayLength(res);
@@ -454,7 +461,7 @@ export class Result_CVec_CVec_u8ZZNoneZ_OK extends Result_CVec_CVec_u8ZZNoneZ {
 export class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index b8e557baf4b2856636e5a3819a59284b88918e6c..d9537b37194863708a6dc475208d54c1308ceb56 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CVec_SignatureZNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CVec_SignatureZNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_CVec_SignatureZNoneZ_OK extends Result_CVec_SignatureZNoneZ
        public res: Uint8Array[];
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_CVec_SignatureZNoneZ_get_ok(ptr);
                const res_conv_12_len: number = bindings.getArrayLength(res);
@@ -454,7 +461,7 @@ export class Result_CVec_SignatureZNoneZ_OK extends Result_CVec_SignatureZNoneZ
 export class Result_CVec_SignatureZNoneZ_Err extends Result_CVec_SignatureZNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 441c02a55add80bf9e76376a9bb865470cb467a3..3a7ce6870e2f5c99c74ed093ea58055f2a16711a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CVec_u8ZPeerHandleErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ_OK extends Result_CVec_u8ZPeerHandl
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -449,7 +456,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHand
        public err: PeerHandleError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_err(ptr);
                const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
index fdd468b6034005dbcb6804c741c723d5d098eeae..40720b56d2cc3b73218db86bdbf8334e1dd2f03e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelAnnouncementDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelAnnouncementDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelAnnouncementDecodeErrorZ = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelAnnouncementDecodeErrorZ_OK extends Result_ChannelAnn
        public res: ChannelAnnouncement;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAn
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelAnnouncementDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 4af8e58f320b3f2e76594b311fae54d7926b4884..2970197e95c11efa2e3a20ab4342eefc8296848d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelConfigDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelConfigDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelConfigDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelConfigDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelConfigDecodeErrorZ = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelConfigDecodeErrorZ_OK extends Result_ChannelConfigDec
        public res: ChannelConfig;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelConfig = new ChannelConfig(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelConfigDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index c50fd0bd383f2e82889f1da87ac2fa7b3d69c8c2..a6fdcaf4583cf7774a6f94c5d973a4eb9599123b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelCounterpartyDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelCounterpartyDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelCounterpartyDecodeErrorZ = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelCounterpartyDecodeErrorZ_OK extends Result_ChannelCou
        public res: ChannelCounterparty;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelCounterparty = new ChannelCounterparty(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelCounterpartyDecodeErrorZ_Err extends Result_ChannelCo
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelCounterpartyDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 7d75613da6e0016b79cc298026a59f9f5ed32ce5..12b3eb675e1c6427e23b550c4e6b93857ee1c53a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelDetailsDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelDetailsDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelDetailsDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelDetailsDecodeErrorZ = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelDetailsDecodeErrorZ_OK extends Result_ChannelDetailsD
        public res: ChannelDetails;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelDetails = new ChannelDetails(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelDetailsDecodeErrorZ_Err extends Result_ChannelDetails
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelDetailsDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 566c7d7d2339f849de405689871e08403f3ac5ea..a728bc767c84003ada1eb75cd492454c7545de76 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelFeaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelFeaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelFeaturesDecodeErrorZ = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelFeaturesDecodeErrorZ_OK extends Result_ChannelFeature
        public res: ChannelFeatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelFeatures = new ChannelFeatures(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeatur
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelFeaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index cd76ec102243844e2064bbc4995cedb4fa991298..acafde0b9b0e9f6e9fc201660c240f529b87c254 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelInfoDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelInfoDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelInfoDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelInfoDecodeErrorZ = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelInfoDecodeErrorZ_OK extends Result_ChannelInfoDecodeE
        public res: ChannelInfo;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelInfo = new ChannelInfo(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecode
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelInfoDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 63c03d72832eddf85a56682abca1b7c909e7d223..af9d4262bf1930457568c7f2c9fb836b43182acd 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelMonitorUpdateDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelMonitorUpdateDecodeErrorZ = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelMonitorUpdateDecodeErrorZ_OK extends Result_ChannelMo
        public res: ChannelMonitorUpdate;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelMonitorUpdateDecodeErrorZ_Err extends Result_ChannelM
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 3d77092701f99c3e00b3539b7e02adf8d1db2e50..012b162c01c4827c2fca52e2386308ef369a9d9a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelPublicKeysDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelPublicKeysDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelPublicKeysDecodeErrorZ = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelPublicKeysDecodeErrorZ_OK extends Result_ChannelPubli
        public res: ChannelPublicKeys;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPubl
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelPublicKeysDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index c558d56835f9db8688ea1c4c491437a08abaecfb..d7b4778f8def3d3610e751c020a1c57b5c5ba735 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelReadyDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelReadyDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelReadyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReadyDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelReadyDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelReadyDecodeErrorZ = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelReadyDecodeErrorZ_OK extends Result_ChannelReadyDecod
        public res: ChannelReady;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelReady = new ChannelReady(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelReadyDecodeErrorZ_Err extends Result_ChannelReadyDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelReadyDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index e168c43610a874d61e547f24347c0af9ef533d8a..f8bb5dd576da98b699715e6f745e8dcf6c4d8066 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelReestablishDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelReestablishDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelReestablishDecodeErrorZ = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelReestablishDecodeErrorZ_OK extends Result_ChannelRees
        public res: ChannelReestablish;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelReestablish = new ChannelReestablish(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelReestablishDecodeErrorZ_Err extends Result_ChannelRee
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelReestablishDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index ff3dc7d7f8422d847ff6fbbe559a20767662c1f2..12f82e61e2da1787bac10e0f368c5e1aa4b515df 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
         * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelTransactionParametersDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelTransactionParametersDecodeErrorZ = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelTransactionParametersDecodeErrorZ_OK extends Result_C
        public res: ChannelTransactionParameters;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index f1a8ef7cf54d6e4c8535d0f8b42ccf17bd8fb3a5..9bde1a0128b0c9b88520db6d97e03470c1ddd97a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelTypeFeaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelTypeFeaturesDecodeErrorZ = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelTypeFeaturesDecodeErrorZ_OK extends Result_ChannelTyp
        public res: ChannelTypeFeatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelTypeFeaturesDecodeErrorZ_Err extends Result_ChannelTy
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 46d292c454db6fe2a9d7d623387773701b81d102..5f83533b68bbbf4122aec50d5d4c1b75a2ca49d7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelUpdateDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelUpdateDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelUpdateDecodeErrorZ = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelUpdateDecodeErrorZ_OK extends Result_ChannelUpdateDec
        public res: ChannelUpdate;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelUpdate = new ChannelUpdate(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelUpdateDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index f05176dcbb59ad9949dbdf9a317c0afabb3a0c8e..ab41dff522a811bc20ff2bba54c66445b00b7985 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ChannelUpdateInfoDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ChannelUpdateInfoDecodeErrorZ = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ChannelUpdateInfoDecodeErrorZ_OK extends Result_ChannelUpdat
        public res: ChannelUpdateInfo;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ChannelUpdateInfo = new ChannelUpdateInfo(null, res);
@@ -451,10 +457,10 @@ export class Result_ChannelUpdateInfoDecodeErrorZ_Err extends Result_ChannelUpda
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 079f04446362631cbeb22007bf8cab9a35bc771e..1809b228c817eb72b9d538d1a7f2fe4461f57586 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ClosingSignedDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ClosingSignedDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ClosingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ClosingSignedDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ClosingSignedDecodeErrorZ = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ClosingSignedDecodeErrorZ_OK extends Result_ClosingSignedDec
        public res: ClosingSigned;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ClosingSigned = new ClosingSigned(null, res);
@@ -451,10 +457,10 @@ export class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ClosingSignedDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 222444455b8664befd1b0d258b3e897dca67ec61..ad98cd7a8827ad26143fb24b911ed456c96a2017 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ClosingSignedFeeRangeDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ClosingSignedFeeRangeDecodeErrorZ = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ClosingSignedFeeRangeDecodeErrorZ_OK extends Result_ClosingS
        public res: ClosingSignedFeeRange;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ClosingSignedFeeRange = new ClosingSignedFeeRange(null, res);
@@ -451,10 +457,10 @@ export class Result_ClosingSignedFeeRangeDecodeErrorZ_Err extends Result_Closing
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 7edf41a851fe4161ac6e4ae62ca7028de274d1df..fd56dfe5127a19d01686aa8c692b30319c565346 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CommitmentSignedDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_CommitmentSignedDecodeErrorZ {
-               const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_CommitmentSignedDecodeErrorZ = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_CommitmentSignedDecodeErrorZ_OK extends Result_CommitmentSig
        public res: CommitmentSigned;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: CommitmentSigned = new CommitmentSigned(null, res);
@@ -451,10 +457,10 @@ export class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSi
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CommitmentSignedDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 3adff92315488d999b6c79f6450ac7e78543e78c..188b9eb77e04f6e787b93a0320c07ee7a799b8e5 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CommitmentTransactionDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_CommitmentTransactionDecodeErrorZ {
-               const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_CommitmentTransactionDecodeErrorZ = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_CommitmentTransactionDecodeErrorZ_OK extends Result_Commitme
        public res: CommitmentTransaction;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, res);
@@ -451,10 +457,10 @@ export class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_Commitm
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CommitmentTransactionDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index e94a5746dd297726f9a7ccb7ab4062f78c299faf..3a8c517f27646c566cd7e150acb0eca3140d4d7b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
         * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
-               const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_CounterpartyChannelTransactionParametersDecodeErrorZ = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK exte
        public res: CounterpartyChannelTransactionParameters;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, res);
@@ -451,10 +457,10 @@ export class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err ext
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index e141621a7442ec0fd963012f95cad0ec532f87b7..91810f3dc3a117437f27fafc53194ae09fdf4c78 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase
         * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_CounterpartyCommitmentSecretsDecodeErrorZ {
-               const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_CounterpartyCommitmentSecretsDecodeErrorZ = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_CounterpartyCommitmentSecretsDecodeErrorZ_OK extends Result_
        public res: CounterpartyCommitmentSecrets;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: CounterpartyCommitmentSecrets = new CounterpartyCommitmentSecrets(null, res);
@@ -451,10 +457,10 @@ export class Result_CounterpartyCommitmentSecretsDecodeErrorZ_Err extends Result
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index cf2fa2f4386169a0b95f593951b9101ef028fb79..dc1fb8033a4542e9d7aaf225a9fe03250233b89f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_CounterpartyForwardingInfoDecodeErrorZ {
-               const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_CounterpartyForwardingInfoDecodeErrorZ = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_CounterpartyForwardingInfoDecodeErrorZ_OK extends Result_Cou
        public res: CounterpartyForwardingInfo;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: CounterpartyForwardingInfo = new CounterpartyForwardingInfo(null, res);
@@ -451,10 +457,10 @@ export class Result_CounterpartyForwardingInfoDecodeErrorZ_Err extends Result_Co
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index d3e6532657ef407661748843ee81e0d4762e74a1..9505fc98995b7581518d1ad9a02857d87a4ee17a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
         * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_DelayedPaymentOutputDescriptorDecodeErrorZ {
-               const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_DelayedPaymentOutputDescriptorDecodeErrorZ = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ_OK extends Result
        public res: DelayedPaymentOutputDescriptor;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, res);
@@ -451,10 +457,10 @@ export class Result_DelayedPaymentOutputDescriptorDecodeErrorZ_Err extends Resul
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 019999fd5fb513f5922bf0a27e2b0216f53e94f1..bac947f0f282db0677866947e3a5b8cb05475bba 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_DescriptionCreationErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_DescriptionCreationErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_DescriptionCreationErrorZ_OK extends Result_DescriptionCreat
        public res: Description;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_DescriptionCreationErrorZ_get_ok(ptr);
                const res_hu_conv: Description = new Description(null, res);
@@ -450,7 +457,7 @@ export class Result_DescriptionCreationErrorZ_Err extends Result_DescriptionCrea
        public err: CreationError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_DescriptionCreationErrorZ_get_err(ptr);
        }
index 736cb7edb56c8367360f603d01ceb66fe04f0709..f2683d708a5d74f0a14aa6c71f1d34030ae3afed 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ErrorMessageDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ErrorMessageDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ErrorMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ErrorMessageDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ErrorMessageDecodeErrorZ = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ErrorMessageDecodeErrorZ_OK extends Result_ErrorMessageDecod
        public res: ErrorMessage;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ErrorMessage = new ErrorMessage(null, res);
@@ -451,10 +457,10 @@ export class Result_ErrorMessageDecodeErrorZ_Err extends Result_ErrorMessageDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ErrorMessageDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 43fbbb8a1c3cba333452b5450d88756926f854cf..7d63927ae276031b2240ab15d16bade0b6c59f4f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_FixedPenaltyScorerDecodeErrorZ {
-               const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_FixedPenaltyScorerDecodeErrorZ = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_FixedPenaltyScorerDecodeErrorZ_OK extends Result_FixedPenalt
        public res: FixedPenaltyScorer;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: FixedPenaltyScorer = new FixedPenaltyScorer(null, res);
@@ -451,10 +457,10 @@ export class Result_FixedPenaltyScorerDecodeErrorZ_Err extends Result_FixedPenal
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index a963255520d243106aa5ad60ba37f1662e7d5db5..48f64dd81f80495bb5880b5b882584d2aad3f076 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_FundingCreatedDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_FundingCreatedDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_FundingCreatedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_FundingCreatedDecodeErrorZ {
-               const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_FundingCreatedDecodeErrorZ = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_FundingCreatedDecodeErrorZ_OK extends Result_FundingCreatedD
        public res: FundingCreated;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: FundingCreated = new FundingCreated(null, res);
@@ -451,10 +457,10 @@ export class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreated
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_FundingCreatedDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index ebb8d94f4c645da6e037fa7f5de207db56c93a3c..46adb406fa4db31316cf0350cc27ebad077d1ba0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_FundingSignedDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_FundingSignedDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_FundingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_FundingSignedDecodeErrorZ {
-               const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_FundingSignedDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_FundingSignedDecodeErrorZ = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_FundingSignedDecodeErrorZ_OK extends Result_FundingSignedDec
        public res: FundingSigned;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_FundingSignedDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: FundingSigned = new FundingSigned(null, res);
@@ -451,10 +457,10 @@ export class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_FundingSignedDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index f60d8c6999b3955e633735b20ef6e09e8263120b..b1830c4eb615423b75846d7827b3fe86ae3806a6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_GossipTimestampFilterDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
         * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_GossipTimestampFilterDecodeErrorZ {
-               const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_GossipTimestampFilterDecodeErrorZ = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_GossipTimestampFilterDecodeErrorZ_OK extends Result_GossipTi
        public res: GossipTimestampFilter;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, res);
@@ -451,10 +457,10 @@ export class Result_GossipTimestampFilterDecodeErrorZ_Err extends Result_GossipT
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_GossipTimestampFilterDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 22fd0168c73497283172c52a7e7448c8eb302750..31c105d54d8823892db05830464303c11e2a2754 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_HTLCOutputInCommitmentDecodeErrorZ {
-               const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_HTLCOutputInCommitmentDecodeErrorZ = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_HTLCOutputInCommitmentDecodeErrorZ_OK extends Result_HTLCOut
        public res: HTLCOutputInCommitment;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, res);
@@ -451,10 +457,10 @@ export class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOu
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 60119c3b7250de1b9d4b234cb6b6ba398a9b852b..26d21831064add5bcc6fd20a105d83d43875e2cf 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_HTLCUpdateDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_HTLCUpdateDecodeErrorZ {
-               const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_HTLCUpdateDecodeErrorZ = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_HTLCUpdateDecodeErrorZ_OK extends Result_HTLCUpdateDecodeErr
        public res: HTLCUpdate;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: HTLCUpdate = new HTLCUpdate(null, res);
@@ -451,10 +457,10 @@ export class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeEr
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_HTLCUpdateDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 30bfd42318adc85dc90367b252444c2edbaedb33..c324b98784dc96762d78754bceebbabd1de324aa 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_HolderCommitmentTransactionDecodeErrorZ {
-               const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_HolderCommitmentTransactionDecodeErrorZ = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_HolderCommitmentTransactionDecodeErrorZ_OK extends Result_Ho
        public res: HolderCommitmentTransaction;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, res);
@@ -451,10 +457,10 @@ export class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_H
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 20f56468164d366cee13d179196dfde7aac0bf17..5132cac3a91a5392085149096bb67f513ce30308 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InFlightHtlcsDecodeErrorZ_free);
        }
        /* @internal */
@@ -413,9 +420,8 @@ export class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_InFlightHtlcsDecodeErrorZ {
-               const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_InFlightHtlcsDecodeErrorZ = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -432,7 +438,7 @@ export class Result_InFlightHtlcsDecodeErrorZ_OK extends Result_InFlightHtlcsDec
        public res: InFlightHtlcs;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: InFlightHtlcs = new InFlightHtlcs(null, res);
@@ -444,10 +450,10 @@ export class Result_InFlightHtlcsDecodeErrorZ_Err extends Result_InFlightHtlcsDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InFlightHtlcsDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 1d3953e29bfef872f0abe22261eb3235de3e790d..dcc0c02dfaa0fa9ef14c2067b9a837087627b58c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InMemorySignerDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InMemorySignerDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_InMemorySignerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_InMemorySignerDecodeErrorZ {
-               const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_InMemorySignerDecodeErrorZ = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_InMemorySignerDecodeErrorZ_OK extends Result_InMemorySignerD
        public res: InMemorySigner;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: InMemorySigner = new InMemorySigner(null, res);
@@ -451,10 +457,10 @@ export class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySigner
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InMemorySignerDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index aeaaa7e1e4b2165c780c5d6dee956b146f133232..11af6a1f70b0ce644bd3c3e727de5bf4eaae993e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InitDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InitDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_InitDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_InitDecodeErrorZ {
-               const ret: bigint = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_InitDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_InitDecodeErrorZ = Result_InitDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_InitDecodeErrorZ_OK extends Result_InitDecodeErrorZ {
        public res: Init;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InitDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Init = new Init(null, res);
@@ -451,10 +457,10 @@ export class Result_InitDecodeErrorZ_Err extends Result_InitDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InitDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 4270b861fe9c156bc5758317d3e9ec8049e2aea8..79e3fb613a7ad083576d5d5946cc00bb2bb18312 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InitFeaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InitFeaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_InitFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_InitFeaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_InitFeaturesDecodeErrorZ = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_InitFeaturesDecodeErrorZ_OK extends Result_InitFeaturesDecod
        public res: InitFeatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: InitFeatures = new InitFeatures(null, res);
@@ -451,10 +457,10 @@ export class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InitFeaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index b8d500473201444b100833f59a2ff959ff8bbfeb..ee25df1e2072fe69e2adf84128c2c228cafe58a8 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InvoiceFeaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_InvoiceFeaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_InvoiceFeaturesDecodeErrorZ = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_InvoiceFeaturesDecodeErrorZ_OK extends Result_InvoiceFeature
        public res: InvoiceFeatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, res);
@@ -451,10 +457,10 @@ export class Result_InvoiceFeaturesDecodeErrorZ_Err extends Result_InvoiceFeatur
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InvoiceFeaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 5c482f68662747b3fbc1b98e64e7d6c048ac6ae0..a6327c7f9aefcccd0dc34450d1d2be313a867a46 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InvoiceParseOrSemanticErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InvoiceParseOrSemanticErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_InvoiceParseOrSemanticErrorZ_OK extends Result_InvoiceParseO
        public res: Invoice;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InvoiceParseOrSemanticErrorZ_get_ok(ptr);
                const res_hu_conv: Invoice = new Invoice(null, res);
@@ -450,7 +457,7 @@ export class Result_InvoiceParseOrSemanticErrorZ_Err extends Result_InvoiceParse
        public err: ParseOrSemanticError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InvoiceParseOrSemanticErrorZ_get_err(ptr);
                const err_hu_conv: ParseOrSemanticError = ParseOrSemanticError.constr_from_ptr(err);
index 1e27fc5196fae19a1454e7aa90b95c45dab98edb..889b0436dfa128faaad568616b432849b0b58349 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InvoiceSemanticErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InvoiceSemanticErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_InvoiceSemanticErrorZ_OK extends Result_InvoiceSemanticError
        public res: Invoice;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InvoiceSemanticErrorZ_get_ok(ptr);
                const res_hu_conv: Invoice = new Invoice(null, res);
@@ -450,7 +457,7 @@ export class Result_InvoiceSemanticErrorZ_Err extends Result_InvoiceSemanticErro
        public err: SemanticError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_InvoiceSemanticErrorZ_get_err(ptr);
        }
index 3846a7222c69c3631dca6bb6ca0aa33008bb2a93..1d4612bf9737389bfbb65c0600c4e4ab5533bf83 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_InvoiceSignOrCreationErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_InvoiceSignOrCreationErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_InvoiceSignOrCreationErrorZ_OK extends Result_InvoiceSignOrC
        public res: Invoice;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_InvoiceSignOrCreationErrorZ_get_ok(ptr);
                const res_hu_conv: Invoice = new Invoice(null, res);
@@ -450,7 +457,7 @@ export class Result_InvoiceSignOrCreationErrorZ_Err extends Result_InvoiceSignOr
        public err: SignOrCreationError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_InvoiceSignOrCreationErrorZ_get_err(ptr);
                const err_hu_conv: SignOrCreationError = SignOrCreationError.constr_from_ptr(err);
index fd0307296ece8f9bb6d4c92541640b5537892551..c3410a714ffda66b890b8b7d71f997ddbf227784 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_LockedChannelMonitorNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_LockedChannelMonitorNoneZ_free);
        }
        /* @internal */
@@ -431,7 +438,7 @@ export class Result_LockedChannelMonitorNoneZ_OK extends Result_LockedChannelMon
        public res: LockedChannelMonitor;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_LockedChannelMonitorNoneZ_get_ok(ptr);
                const res_hu_conv: LockedChannelMonitor = new LockedChannelMonitor(null, res);
@@ -442,7 +449,7 @@ export class Result_LockedChannelMonitorNoneZ_OK extends Result_LockedChannelMon
 export class Result_LockedChannelMonitorNoneZ_Err extends Result_LockedChannelMonitorNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 78e7732de2bd661a0340f623e3aac8dadae77f54..05b447a5666c6df8e51a12969b4f326092ed9433 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
 import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NetAddressDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NetAddressDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_NetAddressDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NetAddressDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NetAddressDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NetAddressDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NetAddressDecodeErrorZ = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_NetAddressDecodeErrorZ_OK extends Result_NetAddressDecodeErr
        public res: NetAddress;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NetAddressDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NetAddress = NetAddress.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_NetAddressDecodeErrorZ_Err extends Result_NetAddressDecodeEr
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NetAddressDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index af71f6624119e13d026fb0f42faea022f26d764b..ef8bf22a25a343466d0671f46cdbbd343da97e75 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NetworkGraphDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NetworkGraphDecodeErrorZ_free);
        }
        /* @internal */
@@ -406,9 +413,8 @@ export class Result_NetworkGraphDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NetworkGraphDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NetworkGraphDecodeErrorZ = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -425,7 +431,7 @@ export class Result_NetworkGraphDecodeErrorZ_OK extends Result_NetworkGraphDecod
        public res: NetworkGraph;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NetworkGraph = new NetworkGraph(null, res);
@@ -437,10 +443,10 @@ export class Result_NetworkGraphDecodeErrorZ_Err extends Result_NetworkGraphDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NetworkGraphDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index a03201c3adcfce72f178a8ee8d315a365cc506db..cfdbd9305c098b879449453e4c7b3cdb3e73a6b1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeAliasDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeAliasDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeAliasDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAliasDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeAliasDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeAliasDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeAliasDecodeErrorZ = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeAliasDecodeErrorZ_OK extends Result_NodeAliasDecodeError
        public res: NodeAlias;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeAliasDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeAlias = new NodeAlias(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeAliasDecodeErrorZ_Err extends Result_NodeAliasDecodeErro
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeAliasDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 2dd5aaded34c375355bb20a6b5596834ee07eea9..ce925186006eb39a9c5f365ee0c29f505ce662b2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeAnnouncementDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeAnnouncementDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeAnnouncementDecodeErrorZ = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeAnnouncementDecodeErrorZ_OK extends Result_NodeAnnouncem
        public res: NodeAnnouncement;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnounce
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeAnnouncementDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 27433669939bffdd426fd3201ad2ab58cda265be..8777f6bb0b4e62867c647b3bbdd15552bfc74c42 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeAnnouncementInfoDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeAnnouncementInfoDecodeErrorZ = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeAnnouncementInfoDecodeErrorZ_OK extends Result_NodeAnnou
        public res: NodeAnnouncementInfo;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeAnnouncementInfoDecodeErrorZ_Err extends Result_NodeAnno
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 96220519b6e72df03a9f7ac9686cc678fc14730f..380cce3faa7a4c937e16d0e52d6924cedd699433 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeFeaturesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeFeaturesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeFeaturesDecodeErrorZ = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeFeaturesDecodeErrorZ_OK extends Result_NodeFeaturesDecod
        public res: NodeFeatures;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeFeatures = new NodeFeatures(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeFeaturesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index b5ca4815c7f3cd178b17810b69404c1d5d783892..7cb6be51927127845bf7607d1f35c08f9487eb32 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeIdDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeIdDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeIdDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeIdDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeIdDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeIdDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeIdDecodeErrorZ = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeIdDecodeErrorZ_OK extends Result_NodeIdDecodeErrorZ {
        public res: NodeId;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeIdDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeId = new NodeId(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeIdDecodeErrorZ_Err extends Result_NodeIdDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeIdDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 81348ab076e798ca6fc6ab1af6aa0da2286a40b4..be39447d58aa3fafee979e7053b94d0b95805c0e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NodeInfoDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NodeInfoDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_NodeInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeInfoDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_NodeInfoDecodeErrorZ {
-               const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_NodeInfoDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_NodeInfoDecodeErrorZ = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_NodeInfoDecodeErrorZ_OK extends Result_NodeInfoDecodeErrorZ
        public res: NodeInfo;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_NodeInfoDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: NodeInfo = new NodeInfo(null, res);
@@ -451,10 +457,10 @@ export class Result_NodeInfoDecodeErrorZ_Err extends Result_NodeInfoDecodeErrorZ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NodeInfoDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index eb55dcf2baa8f91021517f0a909e584c5a5c45b2..8e5d8e20a4b9c0c3144f880f21452bffbe93ee3f 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneAPIErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneAPIErrorZ_free);
        }
        /* @internal */
@@ -436,7 +443,7 @@ export class Result_NoneAPIErrorZ extends CommonBase {
 export class Result_NoneAPIErrorZ_OK extends Result_NoneAPIErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -444,7 +451,7 @@ export class Result_NoneAPIErrorZ_Err extends Result_NoneAPIErrorZ {
        public err: APIError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NoneAPIErrorZ_get_err(ptr);
                const err_hu_conv: APIError = APIError.constr_from_ptr(err);
diff --git a/ts/structs/Result_NoneChannelMonitorUpdateErrZ.mts b/ts/structs/Result_NoneChannelMonitorUpdateErrZ.mts
deleted file mode 100644 (file)
index 1dd3346..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-import { TxOut } from '../structs/TxOut.mjs';
-import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
-import { AccessError } from '../enums/AccessError.mjs';
-import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
-import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
-import { CreationError } from '../enums/CreationError.mjs';
-import { Currency } from '../enums/Currency.mjs';
-import { IOError } from '../enums/IOError.mjs';
-import { Level } from '../enums/Level.mjs';
-import { Network } from '../enums/Network.mjs';
-import { Recipient } from '../enums/Recipient.mjs';
-import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
-import { SemanticError } from '../enums/SemanticError.mjs';
-import { SiPrefix } from '../enums/SiPrefix.mjs';
-import { Bech32Error } from '../structs/Bech32Error.mjs';
-import { BlindedRoute } from '../structs/BlindedRoute.mjs';
-import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
-import { DecodeError } from '../structs/DecodeError.mjs';
-import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
-import { BlindedHop } from '../structs/BlindedHop.mjs';
-import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
-import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
-import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
-import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
-import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
-import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
-import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
-import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
-import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
-import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
-import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
-import { Option_u32Z } from '../structs/Option_u32Z.mjs';
-import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
-import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
-import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
-import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
-import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
-import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
-import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
-import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
-import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
-import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
-import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
-import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
-import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
-import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
-import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
-import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
-import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
-import { ShutdownScript } from '../structs/ShutdownScript.mjs';
-import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
-import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
-import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
-import { RouteHop } from '../structs/RouteHop.mjs';
-import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
-import { Route } from '../structs/Route.mjs';
-import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
-import { RouteParameters } from '../structs/RouteParameters.mjs';
-import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
-import { RouteHint } from '../structs/RouteHint.mjs';
-import { Option_u64Z } from '../structs/Option_u64Z.mjs';
-import { PaymentParameters } from '../structs/PaymentParameters.mjs';
-import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
-import { RouteHintHop } from '../structs/RouteHintHop.mjs';
-import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
-import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
-import { ChannelDetails } from '../structs/ChannelDetails.mjs';
-import { LightningError } from '../structs/LightningError.mjs';
-import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
-import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
-import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
-import { ClosureReason } from '../structs/ClosureReason.mjs';
-import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
-import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
-import { HTLCDestination } from '../structs/HTLCDestination.mjs';
-import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
-import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
-import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
-import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
-import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
-import { OutPoint } from '../structs/OutPoint.mjs';
-import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
-import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
-import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
-import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
-import { Event } from '../structs/Event.mjs';
-import { Option_EventZ } from '../structs/Option_EventZ.mjs';
-import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
-import { AcceptChannel } from '../structs/AcceptChannel.mjs';
-import { OpenChannel } from '../structs/OpenChannel.mjs';
-import { FundingCreated } from '../structs/FundingCreated.mjs';
-import { FundingSigned } from '../structs/FundingSigned.mjs';
-import { ChannelReady } from '../structs/ChannelReady.mjs';
-import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
-import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
-import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
-import { ClosingSigned } from '../structs/ClosingSigned.mjs';
-import { Shutdown } from '../structs/Shutdown.mjs';
-import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
-import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
-import { ErrorMessage } from '../structs/ErrorMessage.mjs';
-import { WarningMessage } from '../structs/WarningMessage.mjs';
-import { ErrorAction } from '../structs/ErrorAction.mjs';
-import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
-import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
-import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
-import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
-import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
-import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
-import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
-import { MonitorEvent } from '../structs/MonitorEvent.mjs';
-import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
-import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
-import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
-import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
-import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
-import { NodeId } from '../structs/NodeId.mjs';
-import { Record } from '../structs/Record.mjs';
-import { Logger, LoggerInterface } from '../structs/Logger.mjs';
-import { NetworkGraph } from '../structs/NetworkGraph.mjs';
-import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
-import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
-import { InitFeatures } from '../structs/InitFeatures.mjs';
-import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
-import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
-import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
-import { NodeFeatures } from '../structs/NodeFeatures.mjs';
-import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
-import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
-import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
-import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
-import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
-import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
-import { Access, AccessInterface } from '../structs/Access.mjs';
-import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
-import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
-import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
-import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
-import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
-import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
-import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
-import { ChannelInfo } from '../structs/ChannelInfo.mjs';
-import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
-import { RoutingFees } from '../structs/RoutingFees.mjs';
-import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
-import { Hostname } from '../structs/Hostname.mjs';
-import { NetAddress } from '../structs/NetAddress.mjs';
-import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
-import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
-import { NodeAlias } from '../structs/NodeAlias.mjs';
-import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
-import { NodeInfo } from '../structs/NodeInfo.mjs';
-import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
-import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
-import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
-import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
-import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
-import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
-import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
-import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
-import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
-import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
-import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
-import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
-import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
-import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
-import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
-import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
-import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
-import { Sign, SignInterface } from '../structs/Sign.mjs';
-import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
-import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
-import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
-import { InMemorySigner } from '../structs/InMemorySigner.mjs';
-import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
-import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
-import { Option_u16Z } from '../structs/Option_u16Z.mjs';
-import { APIError } from '../structs/APIError.mjs';
-import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
-import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
-import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
-import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
-import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
-import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
-import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
-import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
-import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
-import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
-import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
-import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
-import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
-import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
-import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
-import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
-import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
-import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
-import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
-import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
-import { Watch, WatchInterface } from '../structs/Watch.mjs';
-import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
-import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
-import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
-import { ChannelManager } from '../structs/ChannelManager.mjs';
-import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
-import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
-import { ChannelConfig } from '../structs/ChannelConfig.mjs';
-import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
-import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
-import { Type, TypeInterface } from '../structs/Type.mjs';
-import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
-import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
-import { PaymentError } from '../structs/PaymentError.mjs';
-import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
-import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
-import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
-import { ParseError } from '../structs/ParseError.mjs';
-import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
-import { Invoice } from '../structs/Invoice.mjs';
-import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
-import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
-import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
-import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
-import { RawInvoice } from '../structs/RawInvoice.mjs';
-import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
-import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
-import { PayeePubKey } from '../structs/PayeePubKey.mjs';
-import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
-import { PrivateRoute } from '../structs/PrivateRoute.mjs';
-import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
-import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
-import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
-import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
-import { Description } from '../structs/Description.mjs';
-import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
-import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
-import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
-import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
-import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
-import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
-import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
-import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
-import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
-import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
-import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
-import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
-import { Balance } from '../structs/Balance.mjs';
-import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
-import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
-import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
-import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
-import { PeerHandleError } from '../structs/PeerHandleError.mjs';
-import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
-import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
-import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
-import { SendError } from '../structs/SendError.mjs';
-import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
-import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
-import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
-import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
-import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
-import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
-import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
-import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
-import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
-import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
-import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
-import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
-import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
-import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
-import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
-import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
-import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
-import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
-import { Init } from '../structs/Init.mjs';
-import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
-import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
-import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
-import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
-import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
-import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
-import { UpdateFee } from '../structs/UpdateFee.mjs';
-import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
-import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
-import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
-import { OnionMessage } from '../structs/OnionMessage.mjs';
-import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
-import { Ping } from '../structs/Ping.mjs';
-import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
-import { Pong } from '../structs/Pong.mjs';
-import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
-import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
-import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
-import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
-import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
-import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
-import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
-import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
-import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
-import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
-import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
-import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
-import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
-import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
-import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
-import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
-import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
-import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
-import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
-import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
-import { WatchedOutput } from '../structs/WatchedOutput.mjs';
-import { Filter, FilterInterface } from '../structs/Filter.mjs';
-import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
-import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
-import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
-import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
-import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
-import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
-import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
-import { BigSize } from '../structs/BigSize.mjs';
-import { ChannelUsage } from '../structs/ChannelUsage.mjs';
-import { Score, ScoreInterface } from '../structs/Score.mjs';
-import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
-import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
-import { Persister, PersisterInterface } from '../structs/Persister.mjs';
-import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
-import { Future } from '../structs/Future.mjs';
-import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
-import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
-import { UserConfig } from '../structs/UserConfig.mjs';
-import { BestBlock } from '../structs/BestBlock.mjs';
-import { Listen, ListenInterface } from '../structs/Listen.mjs';
-import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
-import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
-import { Persist, PersistInterface } from '../structs/Persist.mjs';
-import { ChainMonitor } from '../structs/ChainMonitor.mjs';
-import { KeysManager } from '../structs/KeysManager.mjs';
-import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
-import { ChainParameters } from '../structs/ChainParameters.mjs';
-import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
-import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
-import { ExpandedKey } from '../structs/ExpandedKey.mjs';
-import { DataLossProtect } from '../structs/DataLossProtect.mjs';
-import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
-import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
-import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
-import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
-import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
-import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
-import { MessageHandler } from '../structs/MessageHandler.mjs';
-import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
-import { PeerManager } from '../structs/PeerManager.mjs';
-import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
-import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
-import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
-import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
-import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
-import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
-import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
-import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
-import { OnionMessenger } from '../structs/OnionMessenger.mjs';
-import { Destination } from '../structs/Destination.mjs';
-import { RawDataPart } from '../structs/RawDataPart.mjs';
-import { Sha256 } from '../structs/Sha256.mjs';
-import { ExpiryTime } from '../structs/ExpiryTime.mjs';
-import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
-import { Fallback } from '../structs/Fallback.mjs';
-import { Payer, PayerInterface } from '../structs/Payer.mjs';
-import { Router, RouterInterface } from '../structs/Router.mjs';
-import { InvoicePayer } from '../structs/InvoicePayer.mjs';
-import { Retry } from '../structs/Retry.mjs';
-import { DefaultRouter } from '../structs/DefaultRouter.mjs';
-
-import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
-import * as bindings from '../bindings.mjs'
-
-
-
-export class Result_NoneChannelMonitorUpdateErrZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
-               super(ptr, bindings.CResult_NoneChannelMonitorUpdateErrZ_free);
-       }
-       /* @internal */
-       public static constr_from_ptr(ptr: bigint): Result_NoneChannelMonitorUpdateErrZ {
-               if (bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(ptr)) {
-                       return new Result_NoneChannelMonitorUpdateErrZ_OK(null, ptr);
-               } else {
-                       return new Result_NoneChannelMonitorUpdateErrZ_Err(null, ptr);
-               }
-       }
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state.
-        */
-       public static constructor_ok(): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok();
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state.
-        */
-       public static constructor_err(e: ChannelMonitorUpdateErr): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e);
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       /**
-        * Checks if the given object is currently in the success state
-        */
-       public is_ok(): boolean {
-               const ret: boolean = bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(this.ptr);
-               return ret;
-       }
-
-       public clone_ptr(): bigint {
-               const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(this.ptr);
-               return ret;
-       }
-
-       /**
-        * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig`
-        * but with all dynamically-allocated buffers duplicated in new buffers.
-        */
-       public clone(): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr);
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-}
-export class Result_NoneChannelMonitorUpdateErrZ_OK extends Result_NoneChannelMonitorUpdateErrZ {
-
-       /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
-               super(_dummy, ptr);
-       }
-}
-export class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ {
-       public err: ChannelMonitorUpdateErr;
-
-       /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
-               super(_dummy, ptr);
-               this.err = bindings.CResult_NoneChannelMonitorUpdateErrZ_get_err(ptr);
-       }
-}
\ No newline at end of file
index f847a76185d3da4d3b7569c77f6080d69430ad02..817c39eeeb312ffaa0ac74c80167929141a3b166 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
 import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneErrorZ_free);
        }
        /* @internal */
@@ -436,7 +443,7 @@ export class Result_NoneErrorZ extends CommonBase {
 export class Result_NoneErrorZ_OK extends Result_NoneErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -444,7 +451,7 @@ export class Result_NoneErrorZ_Err extends Result_NoneErrorZ {
        public err: IOError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_NoneErrorZ_get_err(ptr);
        }
index 97cebb0722d5b8c60d3989f843e8d8f36dc7ff4a..1231012ef11f5f10981d08465f38f8a5d78cd774 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneLightningErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneLightningErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_NoneLightningErrorZ extends CommonBase {
 export class Result_NoneLightningErrorZ_OK extends Result_NoneLightningErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -445,7 +452,7 @@ export class Result_NoneLightningErrorZ_Err extends Result_NoneLightningErrorZ {
        public err: LightningError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NoneLightningErrorZ_get_err(ptr);
                const err_hu_conv: LightningError = new LightningError(null, err);
index d4e959550fc1d5ca7727f4300fc79c48e326aa4f..5fd4ffded1f0e21251c9e92e53343faca97bbdb0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneNoneZ_free);
        }
        /* @internal */
@@ -436,14 +443,14 @@ export class Result_NoneNoneZ extends CommonBase {
 export class Result_NoneNoneZ_OK extends Result_NoneNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
 export class Result_NoneNoneZ_Err extends Result_NoneNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 8cdefdffd1f8c30832352b3044dfb55670850634..f8c15c1a7964ce2f74cb82a699a19dbd0f8e7db4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NonePaymentSendFailureZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NonePaymentSendFailureZ_free);
        }
        /* @internal */
@@ -436,7 +443,7 @@ export class Result_NonePaymentSendFailureZ extends CommonBase {
 export class Result_NonePaymentSendFailureZ_OK extends Result_NonePaymentSendFailureZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -444,7 +451,7 @@ export class Result_NonePaymentSendFailureZ_Err extends Result_NonePaymentSendFa
        public err: PaymentSendFailure;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NonePaymentSendFailureZ_get_err(ptr);
                const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
index 3c4fa64be67b51c373d4c59d9e99960d5b619877..a652a3204c258804e54c275ee1aeafaa30f0e026 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NonePeerHandleErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NonePeerHandleErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_NonePeerHandleErrorZ extends CommonBase {
 export class Result_NonePeerHandleErrorZ_OK extends Result_NonePeerHandleErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -445,7 +452,7 @@ export class Result_NonePeerHandleErrorZ_Err extends Result_NonePeerHandleErrorZ
        public err: PeerHandleError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NonePeerHandleErrorZ_get_err(ptr);
                const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
index 165014fdbbd01af752ca3549e2680548bfcb47e2..2aa56b45c6e00b446b029231deaedb1280bec4d0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneSemanticErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneSemanticErrorZ_free);
        }
        /* @internal */
@@ -436,7 +443,7 @@ export class Result_NoneSemanticErrorZ extends CommonBase {
 export class Result_NoneSemanticErrorZ_OK extends Result_NoneSemanticErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -444,7 +451,7 @@ export class Result_NoneSemanticErrorZ_Err extends Result_NoneSemanticErrorZ {
        public err: SemanticError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_NoneSemanticErrorZ_get_err(ptr);
        }
index 6ebe6faa46822ac87ebf39ed61ff41e2d1dc3efd..2dd4d422f6ccb490af2a198717dccd4062ccbcc1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_NoneSendErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_NoneSendErrorZ_free);
        }
        /* @internal */
@@ -421,7 +428,7 @@ export class Result_NoneSendErrorZ extends CommonBase {
 export class Result_NoneSendErrorZ_OK extends Result_NoneSendErrorZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
@@ -429,7 +436,7 @@ export class Result_NoneSendErrorZ_Err extends Result_NoneSendErrorZ {
        public err: SendError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_NoneSendErrorZ_get_err(ptr);
                const err_hu_conv: SendError = SendError.constr_from_ptr(err);
index 599008d63e82b09f8e36caf45de19cbfde828d6c..635146b9a3818ab85ec4c9dacb872db9c0886705 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_OnionMessageDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_OnionMessageDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_OnionMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_OnionMessageDecodeErrorZ {
-               const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_OnionMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_OnionMessageDecodeErrorZ = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_OnionMessageDecodeErrorZ_OK extends Result_OnionMessageDecod
        public res: OnionMessage;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_OnionMessageDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: OnionMessage = new OnionMessage(null, res);
@@ -451,10 +457,10 @@ export class Result_OnionMessageDecodeErrorZ_Err extends Result_OnionMessageDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_OnionMessageDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index a12ae1c23ff7bb0fa2bec7d46a978046d9a932b1..b60cbb1b5fcbc04fcb35fdf98931d384524974d0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_OpenChannelDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_OpenChannelDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_OpenChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_OpenChannelDecodeErrorZ {
-               const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_OpenChannelDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_OpenChannelDecodeErrorZ = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_OpenChannelDecodeErrorZ_OK extends Result_OpenChannelDecodeE
        public res: OpenChannel;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_OpenChannelDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: OpenChannel = new OpenChannel(null, res);
@@ -451,10 +457,10 @@ export class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecode
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_OpenChannelDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 50f2da8dac50c1931ed60baca459f3a5028e05f1..93c22a85652066916c222e9c1489d586233f8346 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_OutPointDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_OutPointDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_OutPointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OutPointDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_OutPointDecodeErrorZ {
-               const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_OutPointDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_OutPointDecodeErrorZ = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_OutPointDecodeErrorZ_OK extends Result_OutPointDecodeErrorZ
        public res: OutPoint;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_OutPointDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: OutPoint = new OutPoint(null, res);
@@ -451,10 +457,10 @@ export class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_OutPointDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 73180df7b4e8511e79b81347b9a233e4a31de7b1..0a619efc6bb05a22d4bd4429171bff78c36b7b52 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PayeePubKeyErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PayeePubKeyErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_PayeePubKeyErrorZ_OK extends Result_PayeePubKeyErrorZ {
        public res: PayeePubKey;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PayeePubKeyErrorZ_get_ok(ptr);
                const res_hu_conv: PayeePubKey = new PayeePubKey(null, res);
@@ -450,7 +457,7 @@ export class Result_PayeePubKeyErrorZ_Err extends Result_PayeePubKeyErrorZ {
        public err: Secp256k1Error;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_PayeePubKeyErrorZ_get_err(ptr);
        }
index 89be72c1c63d3274645c2a2bea3dd57a3286a0b3..9b6659eaf0d3be754d00e89eeb1ae8a52e188b16 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentIdPaymentErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentIdPaymentErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PaymentIdPaymentErrorZ_OK extends Result_PaymentIdPaymentErr
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PaymentIdPaymentErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_PaymentIdPaymentErrorZ_Err extends Result_PaymentIdPaymentEr
        public err: PaymentError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentIdPaymentErrorZ_get_err(ptr);
                const err_hu_conv: PaymentError = PaymentError.constr_from_ptr(err);
index e3149be090cb91b2528ac114daedb28682b07e7a..c3cd191633b7995ee30dbf18a0e3658665891934 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentIdPaymentSendFailureZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentIdPaymentSendFailureZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PaymentIdPaymentSendFailureZ_OK extends Result_PaymentIdPaym
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PaymentIdPaymentSendFailureZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_PaymentIdPaymentSendFailureZ_Err extends Result_PaymentIdPay
        public err: PaymentSendFailure;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentIdPaymentSendFailureZ_get_err(ptr);
                const err_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(err);
index f9bdaaa3a2628cb38eb23f00dcebb9a7cc9b2e01..995d9f607d209b0e30765634353c56a28cd2315e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentParametersDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentParametersDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_PaymentParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentParametersDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_PaymentParametersDecodeErrorZ {
-               const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_PaymentParametersDecodeErrorZ = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_PaymentParametersDecodeErrorZ_OK extends Result_PaymentParam
        public res: PaymentParameters;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: PaymentParameters = new PaymentParameters(null, res);
@@ -451,10 +457,10 @@ export class Result_PaymentParametersDecodeErrorZ_Err extends Result_PaymentPara
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentParametersDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index c0959223428cfa1e90c8e3d00dce58278ed91772..aa6d9dfa708bdf4b75a0b8f37ed4b2eabeabddff 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentPreimageAPIErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentPreimageAPIErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PaymentPreimageAPIErrorZ_OK extends Result_PaymentPreimageAP
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PaymentPreimageAPIErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_PaymentPreimageAPIErrorZ_Err extends Result_PaymentPreimageA
        public err: APIError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentPreimageAPIErrorZ_get_err(ptr);
                const err_hu_conv: APIError = APIError.constr_from_ptr(err);
index c53dae83984e8bf21cfae708cbe6bfae0cc4ad7b..bba12def486907ae3084a1ec2796407819befad3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentPurposeDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentPurposeDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_PaymentPurposeDecodeErrorZ {
-               const ret: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_PaymentPurposeDecodeErrorZ = Result_PaymentPurposeDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_PaymentPurposeDecodeErrorZ_OK extends Result_PaymentPurposeD
        public res: PaymentPurpose;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_PaymentPurposeDecodeErrorZ_Err extends Result_PaymentPurpose
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentPurposeDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index bf9a3cdc4c4fde8fa65fc3bd1d780183d653a52d..9ff1a7a63df07631295c26e12f5750a83053205e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentSecretAPIErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentSecretAPIErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PaymentSecretAPIErrorZ_OK extends Result_PaymentSecretAPIErr
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PaymentSecretAPIErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_PaymentSecretAPIErrorZ_Err extends Result_PaymentSecretAPIEr
        public err: APIError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PaymentSecretAPIErrorZ_get_err(ptr);
                const err_hu_conv: APIError = APIError.constr_from_ptr(err);
index 961b58c2a47dbca2c15c157109228cd234b4768a..974a596d9821e0c93285c336d63707a3d6741710 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PaymentSecretNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PaymentSecretNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PaymentSecretNoneZ_OK extends Result_PaymentSecretNoneZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PaymentSecretNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_PaymentSecretNoneZ_OK extends Result_PaymentSecretNoneZ {
 export class Result_PaymentSecretNoneZ_Err extends Result_PaymentSecretNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 92f7fcb8d926e872c9685d711f171348783fb938..885ecf14861c65d2c34ecd619af3b0edc336103e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PhantomRouteHintsDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_PhantomRouteHintsDecodeErrorZ {
-               const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_PhantomRouteHintsDecodeErrorZ = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_PhantomRouteHintsDecodeErrorZ_OK extends Result_PhantomRoute
        public res: PhantomRouteHints;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: PhantomRouteHints = new PhantomRouteHints(null, res);
@@ -451,10 +457,10 @@ export class Result_PhantomRouteHintsDecodeErrorZ_Err extends Result_PhantomRout
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PhantomRouteHintsDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index c082bb5ffd5b54e35d0c4d02d61bec8cadd94b28..c75c9c62190146735a7ecca823e1b77763320277 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PingDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PingDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_PingDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PingDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_PingDecodeErrorZ {
-               const ret: bigint = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_PingDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_PingDecodeErrorZ = Result_PingDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_PingDecodeErrorZ_OK extends Result_PingDecodeErrorZ {
        public res: Ping;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PingDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Ping = new Ping(null, res);
@@ -451,10 +457,10 @@ export class Result_PingDecodeErrorZ_Err extends Result_PingDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PingDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index dfcd8b0914621f9a7348cc9dc168e2bf3d70719e..8a0fb60b8dfbb1bb0a72869a392f4504bb3b53d0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PongDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PongDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_PongDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PongDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_PongDecodeErrorZ {
-               const ret: bigint = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_PongDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_PongDecodeErrorZ = Result_PongDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_PongDecodeErrorZ_OK extends Result_PongDecodeErrorZ {
        public res: Pong;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PongDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Pong = new Pong(null, res);
@@ -451,10 +457,10 @@ export class Result_PongDecodeErrorZ_Err extends Result_PongDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_PongDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 96c224850927e5370a2ede05e949a646c8853bff..a58c217e6ca1e228a250de80da221cbbf6f28f6d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PositiveTimestampCreationErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PositiveTimestampCreationErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_PositiveTimestampCreationErrorZ_OK extends Result_PositiveTi
        public res: PositiveTimestamp;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PositiveTimestampCreationErrorZ_get_ok(ptr);
                const res_hu_conv: PositiveTimestamp = new PositiveTimestamp(null, res);
@@ -450,7 +457,7 @@ export class Result_PositiveTimestampCreationErrorZ_Err extends Result_PositiveT
        public err: CreationError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_PositiveTimestampCreationErrorZ_get_err(ptr);
        }
index e20f617315af15ae50b1a81b0938fd222e2feb9c..4f976bca361173caee40ecc3bb30d8a06671e65e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PrivateRouteCreationErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PrivateRouteCreationErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_PrivateRouteCreationErrorZ_OK extends Result_PrivateRouteCre
        public res: PrivateRoute;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_PrivateRouteCreationErrorZ_get_ok(ptr);
                const res_hu_conv: PrivateRoute = new PrivateRoute(null, res);
@@ -450,7 +457,7 @@ export class Result_PrivateRouteCreationErrorZ_Err extends Result_PrivateRouteCr
        public err: CreationError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_PrivateRouteCreationErrorZ_get_err(ptr);
        }
index 15dd34cfabc9ffd4c04faca7014f338128d0043f..44221cd656f2f695d3c3c63045d95208037310c9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ProbabilisticScorerDecodeErrorZ_free);
        }
        /* @internal */
@@ -407,9 +414,8 @@ export class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ProbabilisticScorerDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ProbabilisticScorerDecodeErrorZ = Result_ProbabilisticScorerDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -426,7 +432,7 @@ export class Result_ProbabilisticScorerDecodeErrorZ_OK extends Result_Probabilis
        public res: ProbabilisticScorer;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ProbabilisticScorer = new ProbabilisticScorer(null, res);
@@ -438,10 +444,10 @@ export class Result_ProbabilisticScorerDecodeErrorZ_Err extends Result_Probabili
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ProbabilisticScorerDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 8fd1971b09cd2d00d298a7d2dd05333fe00a7f52..8f4a0861c3c49acecfeaeb2013fb25aa2f6bb1c2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_PublicKeyErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_PublicKeyErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_PublicKeyErrorZ_OK extends Result_PublicKeyErrorZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_PublicKeyErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
        public err: Secp256k1Error;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_PublicKeyErrorZ_get_err(ptr);
        }
diff --git a/ts/structs/Result_PublicKeyNoneZ.mts b/ts/structs/Result_PublicKeyNoneZ.mts
new file mode 100644 (file)
index 0000000..009c45a
--- /dev/null
@@ -0,0 +1,460 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+export class Result_PublicKeyNoneZ extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.CResult_PublicKeyNoneZ_free);
+       }
+       /* @internal */
+       public static constr_from_ptr(ptr: bigint): Result_PublicKeyNoneZ {
+               if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) {
+                       return new Result_PublicKeyNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_PublicKeyNoneZ_Err(null, ptr);
+               }
+       }
+       /**
+        * Creates a new CResult_PublicKeyNoneZ in the success state.
+        */
+       public static constructor_ok(o: Uint8Array): Result_PublicKeyNoneZ {
+               const ret: bigint = bindings.CResult_PublicKeyNoneZ_ok(bindings.encodeUint8Array(bindings.check_arr_len(o, 33)));
+               const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyNoneZ in the error state.
+        */
+       public static constructor_err(): Result_PublicKeyNoneZ {
+               const ret: bigint = bindings.CResult_PublicKeyNoneZ_err();
+               const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public is_ok(): boolean {
+               const ret: boolean = bindings.CResult_PublicKeyNoneZ_is_ok(this.ptr);
+               return ret;
+       }
+
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.CResult_PublicKeyNoneZ_clone_ptr(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PublicKeyNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public clone(): Result_PublicKeyNoneZ {
+               const ret: bigint = bindings.CResult_PublicKeyNoneZ_clone(this.ptr);
+               const ret_hu_conv: Result_PublicKeyNoneZ = Result_PublicKeyNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
+export class Result_PublicKeyNoneZ_OK extends Result_PublicKeyNoneZ {
+       public res: Uint8Array;
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+               const res: number = bindings.CResult_PublicKeyNoneZ_get_ok(ptr);
+               const res_conv: Uint8Array = bindings.decodeUint8Array(res);
+               this.res = res_conv;
+       }
+}
+export class Result_PublicKeyNoneZ_Err extends Result_PublicKeyNoneZ {
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+       }
+}
\ No newline at end of file
index ba544c1cc9c8113dbf0b3a4d088baa01426ca3a7..c01434ad54343a4fda8e901b2a55bd5a51236e78 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_QueryChannelRangeDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_QueryChannelRangeDecodeErrorZ {
-               const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_QueryChannelRangeDecodeErrorZ = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_QueryChannelRangeDecodeErrorZ_OK extends Result_QueryChannel
        public res: QueryChannelRange;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: QueryChannelRange = new QueryChannelRange(null, res);
@@ -451,10 +457,10 @@ export class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChanne
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_QueryChannelRangeDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 095b1eb91ac6682ca539449cb04cd478cbb29177..15d376ee021c2f75738ff25e035b9b06759dee4a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_QueryShortChannelIdsDecodeErrorZ {
-               const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_QueryShortChannelIdsDecodeErrorZ = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_QueryShortChannelIdsDecodeErrorZ_OK extends Result_QueryShor
        public res: QueryShortChannelIds;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, res);
@@ -451,10 +457,10 @@ export class Result_QueryShortChannelIdsDecodeErrorZ_Err extends Result_QuerySho
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 81645b6d1a2e8cb713f2470857b625d56ac7a643..6968c1d1c02d87504afc2dbf143c1d475300f911 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RecoverableSignatureNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RecoverableSignatureNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_RecoverableSignatureNoneZ_OK extends Result_RecoverableSigna
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_RecoverableSignatureNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_RecoverableSignatureNoneZ_OK extends Result_RecoverableSigna
 export class Result_RecoverableSignatureNoneZ_Err extends Result_RecoverableSignatureNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 4989f29d229d8a1184e882249b2ea74a7181ad45..2c61ea486f689aa777580d3b50c708436a4a55ab 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ReplyChannelRangeDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ReplyChannelRangeDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ReplyChannelRangeDecodeErrorZ = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ReplyChannelRangeDecodeErrorZ_OK extends Result_ReplyChannel
        public res: ReplyChannelRange;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, res);
@@ -451,10 +457,10 @@ export class Result_ReplyChannelRangeDecodeErrorZ_Err extends Result_ReplyChanne
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ReplyChannelRangeDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 595d63920159fd8ccededa9a9d4b52220024a07b..f36b891b6fa181943d091f2bce47793245afcd02 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ReplyShortChannelIdsEndDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ReplyShortChannelIdsEndDecodeErrorZ = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ReplyShortChannelIdsEndDecodeErrorZ_OK extends Result_ReplyS
        public res: ReplyShortChannelIdsEnd;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, res);
@@ -451,10 +457,10 @@ export class Result_ReplyShortChannelIdsEndDecodeErrorZ_Err extends Result_Reply
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 88912a57ff59d3c93ccf3a4d2899b78e6dbf219e..29090aecf4f96367c87382ab8bd1662d91084162 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RevokeAndACKDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RevokeAndACKDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RevokeAndACKDecodeErrorZ = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RevokeAndACKDecodeErrorZ_OK extends Result_RevokeAndACKDecod
        public res: RevokeAndACK;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RevokeAndACK = new RevokeAndACK(null, res);
@@ -451,10 +457,10 @@ export class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RevokeAndACKDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index a9738f75a3b0802cedced445e9b4e0f292668587..37e0e5b90231a5a068b312c4a29dbe986d7fc271 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RouteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RouteDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RouteDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RouteDecodeErrorZ = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RouteDecodeErrorZ_OK extends Result_RouteDecodeErrorZ {
        public res: Route;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Route = new Route(null, res);
@@ -451,10 +457,10 @@ export class Result_RouteDecodeErrorZ_Err extends Result_RouteDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 762a4bd58f379a499cb4477bbe0886e2dbb209be..729ce307e9051c074ff8b570fab20329c48f97fa 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteHintDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteHintDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RouteHintDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RouteHintDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RouteHintDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RouteHintDecodeErrorZ = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RouteHintDecodeErrorZ_OK extends Result_RouteHintDecodeError
        public res: RouteHint;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteHintDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RouteHint = new RouteHint(null, res);
@@ -451,10 +457,10 @@ export class Result_RouteHintDecodeErrorZ_Err extends Result_RouteHintDecodeErro
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteHintDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 24a0f207b7cf4e31f1f89b2247d24b80d6ddd491..54475d114979d95765306b91810231f5c7509046 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteHintHopDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteHintHopDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RouteHintHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintHopDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RouteHintHopDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RouteHintHopDecodeErrorZ = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RouteHintHopDecodeErrorZ_OK extends Result_RouteHintHopDecod
        public res: RouteHintHop;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RouteHintHop = new RouteHintHop(null, res);
@@ -451,10 +457,10 @@ export class Result_RouteHintHopDecodeErrorZ_Err extends Result_RouteHintHopDeco
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteHintHopDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 9bdb321e925f68902b753ca637982a81b4da7ecb..f3c51774d37c0672246aff81dc9c8436bc1081ea 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteHopDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteHopDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RouteHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHopDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RouteHopDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RouteHopDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RouteHopDecodeErrorZ = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RouteHopDecodeErrorZ_OK extends Result_RouteHopDecodeErrorZ
        public res: RouteHop;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteHopDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RouteHop = new RouteHop(null, res);
@@ -451,10 +457,10 @@ export class Result_RouteHopDecodeErrorZ_Err extends Result_RouteHopDecodeErrorZ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteHopDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 28191dfedb26b0a3644de97b9c582effc3108d30..c45e74442250e3a5600f808c83994c6ed02bb540 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteLightningErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteLightningErrorZ_free);
        }
        /* @internal */
@@ -439,7 +446,7 @@ export class Result_RouteLightningErrorZ_OK extends Result_RouteLightningErrorZ
        public res: Route;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteLightningErrorZ_get_ok(ptr);
                const res_hu_conv: Route = new Route(null, res);
@@ -451,7 +458,7 @@ export class Result_RouteLightningErrorZ_Err extends Result_RouteLightningErrorZ
        public err: LightningError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteLightningErrorZ_get_err(ptr);
                const err_hu_conv: LightningError = new LightningError(null, err);
index 1e8351128c739e9632608e8ed4a0f439a253ab7f..9ba0d4e76068373159c6ec2040fdd461c0a9126d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RouteParametersDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RouteParametersDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RouteParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteParametersDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RouteParametersDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RouteParametersDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RouteParametersDecodeErrorZ = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RouteParametersDecodeErrorZ_OK extends Result_RouteParameter
        public res: RouteParameters;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RouteParametersDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RouteParameters = new RouteParameters(null, res);
@@ -451,10 +457,10 @@ export class Result_RouteParametersDecodeErrorZ_Err extends Result_RouteParamete
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RouteParametersDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 09dfb938c5c0056b40e9a58cff18d96b888b0fe7..f8379613f6c648e8b48d79ecc9491159306ee35d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_RoutingFeesDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_RoutingFeesDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_RoutingFeesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_RoutingFeesDecodeErrorZ {
-               const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_RoutingFeesDecodeErrorZ = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_RoutingFeesDecodeErrorZ_OK extends Result_RoutingFeesDecodeE
        public res: RoutingFees;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: RoutingFees = new RoutingFees(null, res);
@@ -451,10 +457,10 @@ export class Result_RoutingFeesDecodeErrorZ_Err extends Result_RoutingFeesDecode
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_RoutingFeesDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 6bde86914e9a03785ce49c413bb1f0bd7336c160..d7156a09b2ad5b0a01328b2ad792050ced413645 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SecretKeyErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SecretKeyErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_SecretKeyErrorZ_OK extends Result_SecretKeyErrorZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_SecretKeyErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
        public err: Secp256k1Error;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_SecretKeyErrorZ_get_err(ptr);
        }
index 30b6703cf1173659ecfa6c779b1e0c6779872803..bd0bd1543d2cd7a2080a3c4116a621cb25f7a162 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result
 import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SecretKeyNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SecretKeyNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_SecretKeyNoneZ_OK extends Result_SecretKeyNoneZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_SecretKeyNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_SecretKeyNoneZ_OK extends Result_SecretKeyNoneZ {
 export class Result_SecretKeyNoneZ_Err extends Result_SecretKeyNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 83896860da9a6eb25471b665276b8e86f15669b3..72ca2625629fe7de84d035e2b0a813761068064d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
 import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SharedSecretNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SharedSecretNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_SharedSecretNoneZ_OK extends Result_SharedSecretNoneZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_SharedSecretNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_SharedSecretNoneZ_OK extends Result_SharedSecretNoneZ {
 export class Result_SharedSecretNoneZ_Err extends Result_SharedSecretNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 447ee6e44d2dff33df0a489c976daa38245e5231..31488dbef7f218ec28424881bde619e43f082c03 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ShutdownDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ShutdownDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ShutdownDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ShutdownDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ShutdownDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ShutdownDecodeErrorZ = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ShutdownDecodeErrorZ_OK extends Result_ShutdownDecodeErrorZ
        public res: Shutdown;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ShutdownDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: Shutdown = new Shutdown(null, res);
@@ -451,10 +457,10 @@ export class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ShutdownDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 2ecf80b8ccc9de2858d156d72c35afca7b6c534c..95d327ff241629829148ce3497e626fafb4f6a08 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ShutdownScriptDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_ShutdownScriptDecodeErrorZ {
-               const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_ShutdownScriptDecodeErrorZ = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_ShutdownScriptDecodeErrorZ_OK extends Result_ShutdownScriptD
        public res: ShutdownScript;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: ShutdownScript = new ShutdownScript(null, res);
@@ -451,10 +457,10 @@ export class Result_ShutdownScriptDecodeErrorZ_Err extends Result_ShutdownScript
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ShutdownScriptDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index e7581ed6a205a90890ac2f580bb50b80484cb199..c231c4f08b0a77acd20150358405ddca82f1cef2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free);
        }
        /* @internal */
@@ -439,7 +446,7 @@ export class Result_ShutdownScriptInvalidShutdownScriptZ_OK extends Result_Shutd
        public res: ShutdownScript;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(ptr);
                const res_hu_conv: ShutdownScript = new ShutdownScript(null, res);
@@ -451,7 +458,7 @@ export class Result_ShutdownScriptInvalidShutdownScriptZ_Err extends Result_Shut
        public err: InvalidShutdownScript;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(ptr);
                const err_hu_conv: InvalidShutdownScript = new InvalidShutdownScript(null, err);
index dc52b206677ea916ff684475ba6452367a122b9d..0cf04b4528aeaeb9f6714d11b5244106d5a99e73 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SiPrefixParseErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SiPrefixParseErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_SiPrefixParseErrorZ_OK extends Result_SiPrefixParseErrorZ {
        public res: SiPrefix;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.res = bindings.CResult_SiPrefixParseErrorZ_get_ok(ptr);
        }
@@ -446,7 +453,7 @@ export class Result_SiPrefixParseErrorZ_Err extends Result_SiPrefixParseErrorZ {
        public err: ParseError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_SiPrefixParseErrorZ_get_err(ptr);
                const err_hu_conv: ParseError = ParseError.constr_from_ptr(err);
index 53a58ff347de735ba4af05cacfb2d362d48a87a8..cfdeac0802a3e32d713734fb983a8799b145c7f1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SignDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SignDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_SignDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SignDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_SignDecodeErrorZ {
-               const ret: bigint = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_SignDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_SignDecodeErrorZ = Result_SignDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_SignDecodeErrorZ_OK extends Result_SignDecodeErrorZ {
        public res: Sign;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_SignDecodeErrorZ_get_ok(ptr);
                const ret_hu_conv: Sign = new Sign(null, res);
@@ -451,10 +457,10 @@ export class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_SignDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 793e07c189ab09a887cc5f43b193e618285ce565..8f00edf090ebe034cb49a485e299351c4bc60e2e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SignatureNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SignatureNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_SignatureNoneZ_OK extends Result_SignatureNoneZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_SignatureNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_SignatureNoneZ_OK extends Result_SignatureNoneZ {
 export class Result_SignatureNoneZ_Err extends Result_SignatureNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 5697cf3cf115b89ae54786bb7c28f7d322288676..9a274df1e62c5acfeba43a2b0dc12b19c5fd9b13 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SignedRawInvoiceParseErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SignedRawInvoiceParseErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_SignedRawInvoiceParseErrorZ_OK extends Result_SignedRawInvoi
        public res: SignedRawInvoice;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_SignedRawInvoiceParseErrorZ_get_ok(ptr);
                const res_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, res);
@@ -450,7 +457,7 @@ export class Result_SignedRawInvoiceParseErrorZ_Err extends Result_SignedRawInvo
        public err: ParseError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_SignedRawInvoiceParseErrorZ_get_err(ptr);
                const err_hu_conv: ParseError = ParseError.constr_from_ptr(err);
index 81fffdc1c2aca675a7ba3d12704cf26fcd7781cc..1c26318a38fbab80fde11b6bd4207f9c851509bb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free);
        }
        /* @internal */
@@ -404,9 +411,8 @@ export class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_SpendableOutputDescriptorDecodeErrorZ {
-               const ret: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_SpendableOutputDescriptorDecodeErrorZ = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -438,7 +444,7 @@ export class Result_SpendableOutputDescriptorDecodeErrorZ_OK extends Result_Spen
        public res: SpendableOutputDescriptor;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(res);
@@ -450,10 +456,10 @@ export class Result_SpendableOutputDescriptorDecodeErrorZ_Err extends Result_Spe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 8e17c37a97c0b56b770dbed772bee05f38b2fcd1..73dda550891044411533ff4df26719eecc5929a3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
         * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_StaticPaymentOutputDescriptorDecodeErrorZ {
-               const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_StaticPaymentOutputDescriptorDecodeErrorZ = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_StaticPaymentOutputDescriptorDecodeErrorZ_OK extends Result_
        public res: StaticPaymentOutputDescriptor;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, res);
@@ -451,10 +457,10 @@ export class Result_StaticPaymentOutputDescriptorDecodeErrorZ_Err extends Result
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 8935646c125f6bedf6ba53ea0b213845d15e6b17..b66c1a80fc59f26ecbd67a96834e310eb588e216 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_StringErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_StringErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_StringErrorZ_OK extends Result_StringErrorZ {
        public res: string;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_StringErrorZ_get_ok(ptr);
                const res_conv: string = bindings.decodeString(res);
@@ -448,7 +455,7 @@ export class Result_StringErrorZ_Err extends Result_StringErrorZ {
        public err: Secp256k1Error;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_StringErrorZ_get_err(ptr);
        }
index 1f9bc00cf923151c5a51663601410f961d2cdeed..d34ce7c3d9d2d670a59d65687589c9d339101179 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TransactionNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TransactionNoneZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_TransactionNoneZ_OK extends Result_TransactionNoneZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult_TransactionNoneZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -447,7 +454,7 @@ export class Result_TransactionNoneZ_OK extends Result_TransactionNoneZ {
 export class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index af94fe8fc76ad8b348e4fa5b8603636af2e5ee78..ce6374ab046ce3079866341798835b9d25bb6433 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TrustedClosingTransactionNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TrustedClosingTransactionNoneZ_free);
        }
        /* @internal */
@@ -431,7 +438,7 @@ export class Result_TrustedClosingTransactionNoneZ_OK extends Result_TrustedClos
        public res: TrustedClosingTransaction;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_TrustedClosingTransactionNoneZ_get_ok(ptr);
                const res_hu_conv: TrustedClosingTransaction = new TrustedClosingTransaction(null, res);
@@ -442,7 +449,7 @@ export class Result_TrustedClosingTransactionNoneZ_OK extends Result_TrustedClos
 export class Result_TrustedClosingTransactionNoneZ_Err extends Result_TrustedClosingTransactionNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index a3237a1092c3baea126dd2660f2141881f4593bb..94700375e54a597ace4381414bae6006a73e0256 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TrustedCommitmentTransactionNoneZ_free);
        }
        /* @internal */
@@ -431,7 +438,7 @@ export class Result_TrustedCommitmentTransactionNoneZ_OK extends Result_TrustedC
        public res: TrustedCommitmentTransaction;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_TrustedCommitmentTransactionNoneZ_get_ok(ptr);
                const res_hu_conv: TrustedCommitmentTransaction = new TrustedCommitmentTransaction(null, res);
@@ -442,7 +449,7 @@ export class Result_TrustedCommitmentTransactionNoneZ_OK extends Result_TrustedC
 export class Result_TrustedCommitmentTransactionNoneZ_Err extends Result_TrustedCommitmentTransactionNoneZ {
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
        }
 }
\ No newline at end of file
index 6c1c9dfa91daaf4bb74e7eb4ad94c738fc98cf08..72aad3f895f827f0c31ca19696bb39eb6e74a1ca 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TxCreationKeysDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxCreationKeysDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_TxCreationKeysDecodeErrorZ {
-               const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_TxCreationKeysDecodeErrorZ = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_TxCreationKeysDecodeErrorZ_OK extends Result_TxCreationKeysD
        public res: TxCreationKeys;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
@@ -451,10 +457,10 @@ export class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeys
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_TxCreationKeysDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index fe310cecb1d8fb18dc9f3c7235a5c35a0b09d17c..7caf8de66199e16693332288974b97d82357e710 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TxCreationKeysErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TxCreationKeysErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_TxCreationKeysErrorZ_OK extends Result_TxCreationKeysErrorZ
        public res: TxCreationKeys;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_TxCreationKeysErrorZ_get_ok(ptr);
                const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
@@ -450,7 +457,7 @@ export class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ
        public err: Secp256k1Error;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_TxCreationKeysErrorZ_get_err(ptr);
        }
index ac0a3975c4743d268ff8490c048a2bd47139ed06..963544d66b91445f0f64243793aff29882d43b7b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
 import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_TxOutAccessErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_TxOutAccessErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result_TxOutAccessErrorZ_OK extends Result_TxOutAccessErrorZ {
        public res: TxOut;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_TxOutAccessErrorZ_get_ok(ptr);
                const res_conv: TxOut = new TxOut(null, res);
@@ -448,7 +455,7 @@ export class Result_TxOutAccessErrorZ_Err extends Result_TxOutAccessErrorZ {
        public err: AccessError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.err = bindings.CResult_TxOutAccessErrorZ_get_err(ptr);
        }
index 7611f079ed6d9ae0757494b47528ffc50f47ba74..acc2566a13158936a7a00d8476f6b79bfce07b16 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UnsignedChannelAnnouncementDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UnsignedChannelAnnouncementDecodeErrorZ = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UnsignedChannelAnnouncementDecodeErrorZ_OK extends Result_Un
        public res: UnsignedChannelAnnouncement;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, res);
@@ -451,10 +457,10 @@ export class Result_UnsignedChannelAnnouncementDecodeErrorZ_Err extends Result_U
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 92d9337ca06fdb4639fa03951702e998d1e3ce60..59cfe0fe4e4f1775373f7e043f890e4a478bc1d0 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UnsignedChannelUpdateDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UnsignedChannelUpdateDecodeErrorZ = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UnsignedChannelUpdateDecodeErrorZ_OK extends Result_Unsigned
        public res: UnsignedChannelUpdate;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, res);
@@ -451,10 +457,10 @@ export class Result_UnsignedChannelUpdateDecodeErrorZ_Err extends Result_Unsigne
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index c12adb22fc2beaf163fe083eba9324fc4e15d7a3..548a26b2f94062f4e432436810170e1555fba917 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UnsignedNodeAnnouncementDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UnsignedNodeAnnouncementDecodeErrorZ = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UnsignedNodeAnnouncementDecodeErrorZ_OK extends Result_Unsig
        public res: UnsignedNodeAnnouncement;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, res);
@@ -451,10 +457,10 @@ export class Result_UnsignedNodeAnnouncementDecodeErrorZ_Err extends Result_Unsi
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index a0853fcc380555d5620b470c3fb344c214811779..d9ced8d0a46971ab1d4000c89118720d309c1cce 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UpdateAddHTLCDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UpdateAddHTLCDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UpdateAddHTLCDecodeErrorZ = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UpdateAddHTLCDecodeErrorZ_OK extends Result_UpdateAddHTLCDec
        public res: UpdateAddHTLC;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, res);
@@ -451,10 +457,10 @@ export class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDe
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UpdateAddHTLCDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 47afddeb3f842328c8ac3a343c5fca18230865fc..ae4b4f1dd73f3912f3d0c4c4204fb3112632b734 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UpdateFailHTLCDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UpdateFailHTLCDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UpdateFailHTLCDecodeErrorZ = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UpdateFailHTLCDecodeErrorZ_OK extends Result_UpdateFailHTLCD
        public res: UpdateFailHTLC;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, res);
@@ -451,10 +457,10 @@ export class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLC
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UpdateFailHTLCDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 9012d6059ffd0ce5703de57d5e9b04e2d73a533b..0d2fcb5d791b022811df6723e0408cdbd1fd85a3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UpdateFailMalformedHTLCDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UpdateFailMalformedHTLCDecodeErrorZ = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UpdateFailMalformedHTLCDecodeErrorZ_OK extends Result_Update
        public res: UpdateFailMalformedHTLC;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, res);
@@ -451,10 +457,10 @@ export class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_Updat
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 4c5a0a84b1790281b3fbbeb44cfd68ca892462dd..346ea2193356a0a7c77f3354ed1a11db69466859 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UpdateFeeDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UpdateFeeDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UpdateFeeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UpdateFeeDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UpdateFeeDecodeErrorZ = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UpdateFeeDecodeErrorZ_OK extends Result_UpdateFeeDecodeError
        public res: UpdateFee;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UpdateFee = new UpdateFee(null, res);
@@ -451,10 +457,10 @@ export class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErro
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UpdateFeeDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index f8f79908d2d59262d155eaa7e018ccc946b25fe1..a171af2039200d73f99c09490af26024ad5f1f05 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_UpdateFulfillHTLCDecodeErrorZ {
-               const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_UpdateFulfillHTLCDecodeErrorZ = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_UpdateFulfillHTLCDecodeErrorZ_OK extends Result_UpdateFulfil
        public res: UpdateFulfillHTLC;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, res);
@@ -451,10 +457,10 @@ export class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfi
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 5fd7be07f69edb6fc1a83ac8f15386dec00ef4b4..489fded575c58dd3a2c6350de68211251dea0f79 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_WarningMessageDecodeErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_WarningMessageDecodeErrorZ_free);
        }
        /* @internal */
@@ -405,9 +412,8 @@ export class Result_WarningMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_WarningMessageDecodeErrorZ in the error state.
         */
        public static constructor_err(e: DecodeError): Result_WarningMessageDecodeErrorZ {
-               const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e));
+               const ret: bigint = bindings.CResult_WarningMessageDecodeErrorZ_err(CommonBase.get_ptr_of(e));
                const ret_hu_conv: Result_WarningMessageDecodeErrorZ = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret);
-               CommonBase.add_ref_from(ret_hu_conv, e);
                return ret_hu_conv;
        }
 
@@ -439,7 +445,7 @@ export class Result_WarningMessageDecodeErrorZ_OK extends Result_WarningMessageD
        public res: WarningMessage;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: bigint = bindings.CResult_WarningMessageDecodeErrorZ_get_ok(ptr);
                const res_hu_conv: WarningMessage = new WarningMessage(null, res);
@@ -451,10 +457,10 @@ export class Result_WarningMessageDecodeErrorZ_Err extends Result_WarningMessage
        public err: DecodeError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_WarningMessageDecodeErrorZ_get_err(ptr);
-               const err_hu_conv: DecodeError = new DecodeError(null, err);
+               const err_hu_conv: DecodeError = DecodeError.constr_from_ptr(err);
                CommonBase.add_ref_from(err_hu_conv, this);
                this.err = err_hu_conv;
        }
index 2d8fa172a006002a5033956a5d92cfa5fcd67986..6e611b46f45de117762f68c6144a940f10759830 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result__u832APIErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult__u832APIErrorZ_free);
        }
        /* @internal */
@@ -437,7 +444,7 @@ export class Result__u832APIErrorZ_OK extends Result__u832APIErrorZ {
        public res: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const res: number = bindings.CResult__u832APIErrorZ_get_ok(ptr);
                const res_conv: Uint8Array = bindings.decodeUint8Array(res);
@@ -448,7 +455,7 @@ export class Result__u832APIErrorZ_Err extends Result__u832APIErrorZ {
        public err: APIError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult__u832APIErrorZ_get_err(ptr);
                const err_hu_conv: APIError = APIError.constr_from_ptr(err);
index 725353ad9d0924245a8fcacedd4ae5e67b5d0907..b7d5c510b79a1d10be8f59b3c63b578e93b2b4f4 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_boolLightningErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_boolLightningErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_boolLightningErrorZ_OK extends Result_boolLightningErrorZ {
        public res: boolean;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.res = bindings.CResult_boolLightningErrorZ_get_ok(ptr);
        }
@@ -447,7 +454,7 @@ export class Result_boolLightningErrorZ_Err extends Result_boolLightningErrorZ {
        public err: LightningError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_boolLightningErrorZ_get_err(ptr);
                const err_hu_conv: LightningError = new LightningError(null, err);
index e3e1aeaf9c378364f1ed879b9177b4ed86e6c19c..0b143fd91614bf145746c99b8cfdb8adfb02d0b7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_boolPeerHandleErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_boolPeerHandleErrorZ_free);
        }
        /* @internal */
@@ -438,7 +445,7 @@ export class Result_boolPeerHandleErrorZ_OK extends Result_boolPeerHandleErrorZ
        public res: boolean;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.res = bindings.CResult_boolPeerHandleErrorZ_get_ok(ptr);
        }
@@ -447,7 +454,7 @@ export class Result_boolPeerHandleErrorZ_Err extends Result_boolPeerHandleErrorZ
        public err: PeerHandleError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                const err: bigint = bindings.CResult_boolPeerHandleErrorZ_get_err(ptr);
                const err_hu_conv: PeerHandleError = new PeerHandleError(null, err);
diff --git a/ts/structs/Result_u32GraphSyncErrorZ.mts b/ts/structs/Result_u32GraphSyncErrorZ.mts
new file mode 100644 (file)
index 0000000..4d1e6dc
--- /dev/null
@@ -0,0 +1,448 @@
+import { TxOut } from '../structs/TxOut.mjs';
+import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
+import { AccessError } from '../enums/AccessError.mjs';
+import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
+import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
+import { CreationError } from '../enums/CreationError.mjs';
+import { Currency } from '../enums/Currency.mjs';
+import { IOError } from '../enums/IOError.mjs';
+import { Level } from '../enums/Level.mjs';
+import { Network } from '../enums/Network.mjs';
+import { Recipient } from '../enums/Recipient.mjs';
+import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
+import { SemanticError } from '../enums/SemanticError.mjs';
+import { SiPrefix } from '../enums/SiPrefix.mjs';
+import { Bech32Error } from '../structs/Bech32Error.mjs';
+import { BlindedRoute } from '../structs/BlindedRoute.mjs';
+import { Result_BlindedRouteNoneZ } from '../structs/Result_BlindedRouteNoneZ.mjs';
+import { DecodeError } from '../structs/DecodeError.mjs';
+import { Result_BlindedRouteDecodeErrorZ } from '../structs/Result_BlindedRouteDecodeErrorZ.mjs';
+import { BlindedHop } from '../structs/BlindedHop.mjs';
+import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
+import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
+import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
+import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
+import { Result_SecretKeyErrorZ } from '../structs/Result_SecretKeyErrorZ.mjs';
+import { Result_PublicKeyErrorZ } from '../structs/Result_PublicKeyErrorZ.mjs';
+import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
+import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
+import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
+import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
+import { Result_TxCreationKeysErrorZ } from '../structs/Result_TxCreationKeysErrorZ.mjs';
+import { Option_u32Z } from '../structs/Option_u32Z.mjs';
+import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
+import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
+import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
+import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
+import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
+import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
+import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
+import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
+import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
+import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
+import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
+import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
+import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
+import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
+import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
+import { Result_CVec_SignatureZNoneZ } from '../structs/Result_CVec_SignatureZNoneZ.mjs';
+import { ShutdownScript } from '../structs/ShutdownScript.mjs';
+import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
+import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
+import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
+import { RouteHop } from '../structs/RouteHop.mjs';
+import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
+import { Route } from '../structs/Route.mjs';
+import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
+import { RouteParameters } from '../structs/RouteParameters.mjs';
+import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
+import { RouteHint } from '../structs/RouteHint.mjs';
+import { Option_u64Z } from '../structs/Option_u64Z.mjs';
+import { PaymentParameters } from '../structs/PaymentParameters.mjs';
+import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
+import { RouteHintHop } from '../structs/RouteHintHop.mjs';
+import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
+import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
+import { ChannelDetails } from '../structs/ChannelDetails.mjs';
+import { LightningError } from '../structs/LightningError.mjs';
+import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
+import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
+import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
+import { ClosureReason } from '../structs/ClosureReason.mjs';
+import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
+import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
+import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
+import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
+import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
+import { OutPoint } from '../structs/OutPoint.mjs';
+import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
+import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
+import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
+import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
+import { Event } from '../structs/Event.mjs';
+import { Option_EventZ } from '../structs/Option_EventZ.mjs';
+import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
+import { AcceptChannel } from '../structs/AcceptChannel.mjs';
+import { OpenChannel } from '../structs/OpenChannel.mjs';
+import { FundingCreated } from '../structs/FundingCreated.mjs';
+import { FundingSigned } from '../structs/FundingSigned.mjs';
+import { ChannelReady } from '../structs/ChannelReady.mjs';
+import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
+import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
+import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
+import { ClosingSigned } from '../structs/ClosingSigned.mjs';
+import { Shutdown } from '../structs/Shutdown.mjs';
+import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
+import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
+import { ErrorMessage } from '../structs/ErrorMessage.mjs';
+import { WarningMessage } from '../structs/WarningMessage.mjs';
+import { ErrorAction } from '../structs/ErrorAction.mjs';
+import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
+import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
+import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
+import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
+import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
+import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
+import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
+import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
+import { MonitorEvent } from '../structs/MonitorEvent.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
+import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
+import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
+import { Record } from '../structs/Record.mjs';
+import { Logger, LoggerInterface } from '../structs/Logger.mjs';
+import { NetworkGraph } from '../structs/NetworkGraph.mjs';
+import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
+import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
+import { InitFeatures } from '../structs/InitFeatures.mjs';
+import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
+import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
+import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
+import { NodeFeatures } from '../structs/NodeFeatures.mjs';
+import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
+import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
+import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
+import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
+import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
+import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
+import { Access, AccessInterface } from '../structs/Access.mjs';
+import { Option_AccessZ } from '../structs/Option_AccessZ.mjs';
+import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
+import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
+import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
+import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
+import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
+import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
+import { ChannelInfo } from '../structs/ChannelInfo.mjs';
+import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
+import { RoutingFees } from '../structs/RoutingFees.mjs';
+import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
+import { NetAddress } from '../structs/NetAddress.mjs';
+import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
+import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
+import { NodeInfo } from '../structs/NodeInfo.mjs';
+import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
+import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
+import { Option_CVec_NetAddressZZ } from '../structs/Option_CVec_NetAddressZZ.mjs';
+import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
+import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
+import { TwoTuple_SignatureCVec_SignatureZZ } from '../structs/TwoTuple_SignatureCVec_SignatureZZ.mjs';
+import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.mjs';
+import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
+import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
+import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
+import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
+import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
+import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
+import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
+import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
+import { BaseSign, BaseSignInterface } from '../structs/BaseSign.mjs';
+import { Sign, SignInterface } from '../structs/Sign.mjs';
+import { Result_SignDecodeErrorZ } from '../structs/Result_SignDecodeErrorZ.mjs';
+import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
+import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
+import { InMemorySigner } from '../structs/InMemorySigner.mjs';
+import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
+import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
+import { Option_u16Z } from '../structs/Option_u16Z.mjs';
+import { APIError } from '../structs/APIError.mjs';
+import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
+import { Result__u832APIErrorZ } from '../structs/Result__u832APIErrorZ.mjs';
+import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
+import { Result_PaymentIdPaymentSendFailureZ } from '../structs/Result_PaymentIdPaymentSendFailureZ.mjs';
+import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentIdZ } from '../structs/TwoTuple_PaymentHashPaymentIdZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ } from '../structs/Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.mjs';
+import { TwoTuple_PaymentHashPaymentSecretZ } from '../structs/TwoTuple_PaymentHashPaymentSecretZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZNoneZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZNoneZ.mjs';
+import { Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ } from '../structs/Result_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ.mjs';
+import { Result_PaymentSecretNoneZ } from '../structs/Result_PaymentSecretNoneZ.mjs';
+import { Result_PaymentSecretAPIErrorZ } from '../structs/Result_PaymentSecretAPIErrorZ.mjs';
+import { Result_PaymentPreimageAPIErrorZ } from '../structs/Result_PaymentPreimageAPIErrorZ.mjs';
+import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
+import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
+import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
+import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
+import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
+import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
+import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
+import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
+import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
+import { Watch, WatchInterface } from '../structs/Watch.mjs';
+import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
+import { KeysInterface, KeysInterfaceInterface } from '../structs/KeysInterface.mjs';
+import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
+import { ChannelManager } from '../structs/ChannelManager.mjs';
+import { TwoTuple_BlockHashChannelManagerZ } from '../structs/TwoTuple_BlockHashChannelManagerZ.mjs';
+import { Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.mjs';
+import { ChannelConfig } from '../structs/ChannelConfig.mjs';
+import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
+import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
+import { Type, TypeInterface } from '../structs/Type.mjs';
+import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
+import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
+import { PaymentError } from '../structs/PaymentError.mjs';
+import { Result_PaymentIdPaymentErrorZ } from '../structs/Result_PaymentIdPaymentErrorZ.mjs';
+import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
+import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
+import { ParseError } from '../structs/ParseError.mjs';
+import { Result_SiPrefixParseErrorZ } from '../structs/Result_SiPrefixParseErrorZ.mjs';
+import { Invoice } from '../structs/Invoice.mjs';
+import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
+import { Result_InvoiceParseOrSemanticErrorZ } from '../structs/Result_InvoiceParseOrSemanticErrorZ.mjs';
+import { SignedRawInvoice } from '../structs/SignedRawInvoice.mjs';
+import { Result_SignedRawInvoiceParseErrorZ } from '../structs/Result_SignedRawInvoiceParseErrorZ.mjs';
+import { RawInvoice } from '../structs/RawInvoice.mjs';
+import { InvoiceSignature } from '../structs/InvoiceSignature.mjs';
+import { ThreeTuple_RawInvoice_u832InvoiceSignatureZ } from '../structs/ThreeTuple_RawInvoice_u832InvoiceSignatureZ.mjs';
+import { PayeePubKey } from '../structs/PayeePubKey.mjs';
+import { Result_PayeePubKeyErrorZ } from '../structs/Result_PayeePubKeyErrorZ.mjs';
+import { PrivateRoute } from '../structs/PrivateRoute.mjs';
+import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
+import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
+import { Result_NoneSemanticErrorZ } from '../structs/Result_NoneSemanticErrorZ.mjs';
+import { Result_InvoiceSemanticErrorZ } from '../structs/Result_InvoiceSemanticErrorZ.mjs';
+import { Description } from '../structs/Description.mjs';
+import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
+import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
+import { Result_StringErrorZ } from '../structs/Result_StringErrorZ.mjs';
+import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
+import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
+import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
+import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
+import { TwoTuple_OutPointScriptZ } from '../structs/TwoTuple_OutPointScriptZ.mjs';
+import { TwoTuple_u32ScriptZ } from '../structs/TwoTuple_u32ScriptZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.mjs';
+import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
+import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.mjs';
+import { Balance } from '../structs/Balance.mjs';
+import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
+import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
+import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
+import { PeerHandleError } from '../structs/PeerHandleError.mjs';
+import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
+import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
+import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
+import { SendError } from '../structs/SendError.mjs';
+import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
+import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
+import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
+import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
+import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
+import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
+import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
+import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
+import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
+import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
+import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
+import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
+import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
+import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
+import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
+import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
+import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
+import { Init } from '../structs/Init.mjs';
+import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
+import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
+import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
+import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
+import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
+import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
+import { UpdateFee } from '../structs/UpdateFee.mjs';
+import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
+import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
+import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
+import { OnionMessage } from '../structs/OnionMessage.mjs';
+import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
+import { Ping } from '../structs/Ping.mjs';
+import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
+import { Pong } from '../structs/Pong.mjs';
+import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
+import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
+import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
+import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
+import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
+import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
+import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
+import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
+import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
+import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
+import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
+import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
+import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
+import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
+import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
+import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
+import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
+import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
+import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
+import { Result_InvoiceSignOrCreationErrorZ } from '../structs/Result_InvoiceSignOrCreationErrorZ.mjs';
+import { WatchedOutput } from '../structs/WatchedOutput.mjs';
+import { Filter, FilterInterface } from '../structs/Filter.mjs';
+import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
+import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
+import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
+import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
+import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
+import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
+import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
+import { BigSize } from '../structs/BigSize.mjs';
+import { ChannelUsage } from '../structs/ChannelUsage.mjs';
+import { Score, ScoreInterface } from '../structs/Score.mjs';
+import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
+import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
+import { Persister, PersisterInterface } from '../structs/Persister.mjs';
+import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
+import { Future } from '../structs/Future.mjs';
+import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
+import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
+import { UserConfig } from '../structs/UserConfig.mjs';
+import { BestBlock } from '../structs/BestBlock.mjs';
+import { Listen, ListenInterface } from '../structs/Listen.mjs';
+import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
+import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
+import { Persist, PersistInterface } from '../structs/Persist.mjs';
+import { ChainMonitor } from '../structs/ChainMonitor.mjs';
+import { KeysManager } from '../structs/KeysManager.mjs';
+import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
+import { ChainParameters } from '../structs/ChainParameters.mjs';
+import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
+import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
+import { ExpandedKey } from '../structs/ExpandedKey.mjs';
+import { DataLossProtect } from '../structs/DataLossProtect.mjs';
+import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
+import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
+import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
+import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
+import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
+import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
+import { MessageHandler } from '../structs/MessageHandler.mjs';
+import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
+import { PeerManager } from '../structs/PeerManager.mjs';
+import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
+import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
+import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
+import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
+import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
+import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
+import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
+import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
+import { OnionMessenger } from '../structs/OnionMessenger.mjs';
+import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
+import { RawDataPart } from '../structs/RawDataPart.mjs';
+import { Sha256 } from '../structs/Sha256.mjs';
+import { ExpiryTime } from '../structs/ExpiryTime.mjs';
+import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
+import { Fallback } from '../structs/Fallback.mjs';
+import { Payer, PayerInterface } from '../structs/Payer.mjs';
+import { Router, RouterInterface } from '../structs/Router.mjs';
+import { InvoicePayer } from '../structs/InvoicePayer.mjs';
+import { Retry } from '../structs/Retry.mjs';
+import { DefaultRouter } from '../structs/DefaultRouter.mjs';
+
+import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
+import * as bindings from '../bindings.mjs'
+
+
+
+export class Result_u32GraphSyncErrorZ extends CommonBase {
+       protected constructor(_dummy: null, ptr: bigint) {
+               super(ptr, bindings.CResult_u32GraphSyncErrorZ_free);
+       }
+       /* @internal */
+       public static constr_from_ptr(ptr: bigint): Result_u32GraphSyncErrorZ {
+               if (bindings.CResult_u32GraphSyncErrorZ_is_ok(ptr)) {
+                       return new Result_u32GraphSyncErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_u32GraphSyncErrorZ_Err(null, ptr);
+               }
+       }
+       /**
+        * Creates a new CResult_u32GraphSyncErrorZ in the success state.
+        */
+       public static constructor_ok(o: number): Result_u32GraphSyncErrorZ {
+               const ret: bigint = bindings.CResult_u32GraphSyncErrorZ_ok(o);
+               const ret_hu_conv: Result_u32GraphSyncErrorZ = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_u32GraphSyncErrorZ in the error state.
+        */
+       public static constructor_err(e: GraphSyncError): Result_u32GraphSyncErrorZ {
+               const ret: bigint = bindings.CResult_u32GraphSyncErrorZ_err(CommonBase.get_ptr_of(e));
+               const ret_hu_conv: Result_u32GraphSyncErrorZ = Result_u32GraphSyncErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public is_ok(): boolean {
+               const ret: boolean = bindings.CResult_u32GraphSyncErrorZ_is_ok(this.ptr);
+               return ret;
+       }
+
+}
+export class Result_u32GraphSyncErrorZ_OK extends Result_u32GraphSyncErrorZ {
+       public res: number;
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+               this.res = bindings.CResult_u32GraphSyncErrorZ_get_ok(ptr);
+       }
+}
+export class Result_u32GraphSyncErrorZ_Err extends Result_u32GraphSyncErrorZ {
+       public err: GraphSyncError;
+
+       /* @internal */
+       public constructor(_dummy: null, ptr: bigint) {
+               super(_dummy, ptr);
+               const err: bigint = bindings.CResult_u32GraphSyncErrorZ_get_err(ptr);
+               const err_hu_conv: GraphSyncError = GraphSyncError.constr_from_ptr(err);
+               CommonBase.add_ref_from(err_hu_conv, this);
+               this.err = err_hu_conv;
+       }
+}
\ No newline at end of file
index bf38f468a89d22e73bed527131c4f4c59792c96e..b1a439c1c3b3b71ae4fb2a52d9b2d72ba9a81f0b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -381,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * Strategies available to retry payment path failures for an [`Invoice`].
  */
 export class Retry extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Retry_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Retry_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): Retry {
                const raw_ty: number = bindings.LDKRetry_ty_from_ptr(ptr);
index 271dfbab584e3ded361103a84462685cb489fe50..09e7ca8ceb3c27664b926d23078c9df82772cb7d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RevokeAndACK extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RevokeAndACK_free);
        }
 
@@ -460,6 +467,17 @@ export class RevokeAndACK extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two RevokeAndACKs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: RevokeAndACK): boolean {
+               const ret: boolean = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the RevokeAndACK object into a byte array which can be read by RevokeAndACK_read
         */
index 47597166504e23ae7a568b25090e15879ef319d3..e8d46150be3307c3bd141e1abffb8405294f730c 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Route extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Route_free);
        }
 
@@ -453,7 +460,7 @@ export class Route extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_payment_params(val: PaymentParameters): void {
+       public set_payment_params(val: PaymentParameters|null): void {
                bindings.Route_set_payment_params(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
                CommonBase.add_ref_from(this, val);
        }
index 295e9c3e6a27213bb8207eec3d7845033ff757c5..cb6c243da181de0d4e2bd825f61b15c1642bd256 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RouteHint extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RouteHint_free);
        }
 
index 4d59425d9fd5f714ab0f18ad8dbe8f302ba1cbaa..10a099f07798d97ff643fbdc86432f9efa5e29cb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RouteHintHop extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RouteHintHop_free);
        }
 
index 3fab4adfea2e5578ef64936102cd7a2c493b82f2..bc02116e2d3b081d502573fc987285ffea1bf30b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RouteHop extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RouteHop_free);
        }
 
index c19abcb564ec2bbd23908fd8187aa6516fb99c2f..ed8dbf1759624b0b0edf74303ef2e82e42422795 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RouteParameters extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RouteParameters_free);
        }
 
index 547f0e4f4dbe9955848e53444b220d92175f65e3..ed1f5ee715275687eafc2ded50ac3a0e1d977d80 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -402,7 +409,7 @@ export interface RouterInterface {
 }
 
 class LDKRouterHolder {
-       held: Router;
+       held: Router|null = null;
 }
 
 /**
@@ -410,13 +417,13 @@ class LDKRouterHolder {
  */
 export class Router extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKRouter;
+       public bindings_instance: bindings.LDKRouter|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Router_free);
                this.bindings_instance = null;
        }
@@ -431,11 +438,13 @@ export class Router extends CommonBase {
                                const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
                                const first_hops_conv_16_len: number = bindings.getArrayLength(first_hops);
                                const first_hops_conv_16_arr: ChannelDetails[] = new Array(first_hops_conv_16_len).fill(null);
-                               for (var q = 0; q < first_hops_conv_16_len; q++) {
-                                       const first_hops_conv_16: bigint = bindings.getU64ArrayElem(first_hops, q);
-                                       const first_hops_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, first_hops_conv_16);
-                                       CommonBase.add_ref_from(first_hops_conv_16_hu_conv, this);
-                                       first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+                               if (first_hops != null) {
+                                       for (var q = 0; q < first_hops_conv_16_len; q++) {
+                                               const first_hops_conv_16: bigint = bindings.getU64ArrayElem(first_hops, q);
+                                               const first_hops_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, first_hops_conv_16);
+                                               CommonBase.add_ref_from(first_hops_conv_16_hu_conv, this);
+                                               first_hops_conv_16_arr[q] = first_hops_conv_16_hu_conv;
+                                       }
                                }
                                bindings.freeWasmMemory(first_hops)
                                const inflight_htlcs_hu_conv: InFlightHtlcs = new InFlightHtlcs(null, inflight_htlcs);
@@ -498,7 +507,7 @@ export class Router extends CommonBase {
                impl_holder.held = new Router(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -506,11 +515,11 @@ export class Router extends CommonBase {
         * 
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public find_route(payer: Uint8Array, route_params: RouteParameters, payment_hash: Uint8Array, first_hops: ChannelDetails[], inflight_htlcs: InFlightHtlcs): Result_RouteLightningErrorZ {
+       public find_route(payer: Uint8Array, route_params: RouteParameters, payment_hash: Uint8Array, first_hops: ChannelDetails[]|null, inflight_htlcs: InFlightHtlcs): Result_RouteLightningErrorZ {
                const ret: bigint = bindings.Router_find_route(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(payer, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), inflight_htlcs == null ? 0n : CommonBase.get_ptr_of(inflight_htlcs));
                const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, route_params);
-               first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); });
+               if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(this, first_hops_conv_16); }) };
                CommonBase.add_ref_from(this, inflight_htlcs);
                // 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.
index b83863b64f9f5260a721bf7b0992b2ca32b018b2..0123f5587b4a532eaab33fde89b1f5a4454a8821 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RoutingFees extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RoutingFees_free);
        }
 
index f059e7debcf3b7a82c84175d306f1dcb725f3961..77efe5064d3696a7ed47d509d87118aae66eba0a 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -411,8 +418,12 @@ export interface RoutingMessageHandlerInterface {
        /**Called when a connection is established with a peer. This can be used to
         * perform routing table synchronization using a strategy defined by the
         * implementor.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       peer_connected(their_node_id: Uint8Array, init: Init): void;
+       peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ;
        /**Handles the reply of a query we initiated to learn about channels
         * for a given range of blocks. We can expect to receive one or more
         * replies to a single query.
@@ -447,7 +458,7 @@ export interface RoutingMessageHandlerInterface {
 }
 
 class LDKRoutingMessageHandlerHolder {
-       held: RoutingMessageHandler;
+       held: RoutingMessageHandler|null = null;
 }
 
 /**
@@ -461,13 +472,13 @@ class LDKRoutingMessageHandlerHolder {
  */
 export class RoutingMessageHandler extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKRoutingMessageHandler;
+       public bindings_instance: bindings.LDKRoutingMessageHandler|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RoutingMessageHandler_free);
                this.bindings_instance = null;
        }
@@ -505,10 +516,12 @@ export class RoutingMessageHandler extends CommonBase {
                                const result: bigint = ret == null ? 0n : ret.clone_ptr();
                                return result;
                        },
-                       peer_connected (their_node_id: number, init: bigint): void {
+                       peer_connected (their_node_id: number, init: bigint): bigint {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
                                const init_hu_conv: Init = new Init(null, init);
-                               arg.peer_connected(their_node_id_conv, init_hu_conv);
+                               const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, init_hu_conv);
+                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
+                               return result;
                        },
                        handle_reply_channel_range (their_node_id: number, msg: bigint): bigint {
                                const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
@@ -555,13 +568,13 @@ export class RoutingMessageHandler extends CommonBase {
                        },
                } as bindings.LDKRoutingMessageHandler;
                const messageSendEventsProvider = MessageSendEventsProvider.new_impl(messageSendEventsProvider_impl, );
-               const ptr_idx: [bigint, number] = bindings.LDKRoutingMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx);
+               const ptr_idx: [bigint, number] = bindings.LDKRoutingMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx!);
 
                impl_holder.held = new RoutingMessageHandler(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(messageSendEventsProvider);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -618,7 +631,7 @@ export class RoutingMessageHandler extends CommonBase {
         * Note that starting_point (or a relevant inner pointer) may be NULL or all-0s to represent None
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public get_next_node_announcement(starting_point: Uint8Array): NodeAnnouncement {
+       public get_next_node_announcement(starting_point: Uint8Array|null): NodeAnnouncement {
                const ret: bigint = bindings.RoutingMessageHandler_get_next_node_announcement(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(starting_point, 33)));
                const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
@@ -629,10 +642,16 @@ export class RoutingMessageHandler extends CommonBase {
         * Called when a connection is established with a peer. This can be used to
         * perform routing table synchronization using a strategy defined by the
         * implementor.
+        * 
+        * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+        * with us. Implementors should be somewhat conservative about doing so, however, as other
+        * message handlers may still wish to communicate with this peer.
         */
-       public peer_connected(their_node_id: Uint8Array, init: Init): void {
-               bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+       public peer_connected(their_node_id: Uint8Array, init: Init): Result_NoneNoneZ {
+               const ret: bigint = bindings.RoutingMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), init == null ? 0n : CommonBase.get_ptr_of(init));
+               const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(this, init);
+               return ret_hu_conv;
        }
 
        /**
index 4c4fb60aeb4f079bf016356b02c461d57d06ec19..d10d7904e0b9c77a1a8e41b4f86c61053301d81e 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -410,7 +417,7 @@ export interface ScoreInterface {
 }
 
 class LDKScoreHolder {
-       held: Score;
+       held: Score|null = null;
 }
 
 /**
@@ -420,13 +427,13 @@ class LDKScoreHolder {
  */
 export class Score extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKScore;
+       public bindings_instance: bindings.LDKScore|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Score_free);
                this.bindings_instance = null;
        }
@@ -502,7 +509,7 @@ export class Score extends CommonBase {
                impl_holder.held = new Score(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 29f6caeb8ee35e694c0b13c821a544da8787365f..c9e9370480fec04b954669c4d46f092020e4a983 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,12 +252,17 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -380,10 +387,10 @@ import * as bindings from '../bindings.mjs'
 /**
  * Errors that may occur when [sending an onion message].
  * 
- * [sending an onion message]: OnionMessenger::send_onion_message
+ * [sending an onion message]: OnionMessenger::send_custom_onion_message
  */
 export class SendError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SendError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SendError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): SendError {
                const raw_ty: number = bindings.LDKSendError_ty_from_ptr(ptr);
@@ -392,7 +399,8 @@ export class SendError extends CommonBase {
                        case 1: return new SendError_TooBigPacket(ptr);
                        case 2: return new SendError_TooFewBlindedHops(ptr);
                        case 3: return new SendError_InvalidFirstHop(ptr);
-                       case 4: return new SendError_BufferFull(ptr);
+                       case 4: return new SendError_InvalidMessage(ptr);
+                       case 5: return new SendError_BufferFull(ptr);
                        default:
                                throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
                }
@@ -453,6 +461,16 @@ export class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new InvalidMessage-variant SendError
+        */
+       public static constructor_invalid_message(): SendError {
+               const ret: bigint = bindings.SendError_invalid_message();
+               const ret_hu_conv: SendError = SendError.constr_from_ptr(ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new BufferFull-variant SendError
         */
@@ -463,6 +481,15 @@ export class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two SendErrors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: SendError): boolean {
+               const ret: boolean = bindings.SendError_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
 }
 /** A SendError of type Secp256k1 */
 export class SendError_Secp256k1 extends SendError {
@@ -494,6 +521,13 @@ export class SendError_InvalidFirstHop extends SendError {
                super(null, ptr);
        }
 }
+/** A SendError of type InvalidMessage */
+export class SendError_InvalidMessage extends SendError {
+       /* @internal */
+       public constructor(ptr: bigint) {
+               super(null, ptr);
+       }
+}
 /** A SendError of type BufferFull */
 export class SendError_BufferFull extends SendError {
        /* @internal */
index e86d4399e386b3cd55e97ebae4bd7e197a3b71f7..35123bb4656c1de5ac834cee1713b945a9cfd956 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
 import { MinFinalCltvExpiry } from '../structs/MinFinalCltvExpiry.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Sha256 extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Sha256_free);
        }
 
index 689d3f830cba4b324d425a2b7f5de35316958233..2a2cfb2bacfa3b0b23c03ccd1882b5352fa49125 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class Shutdown extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Shutdown_free);
        }
 
@@ -446,6 +453,17 @@ export class Shutdown extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two Shutdowns contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: Shutdown): boolean {
+               const ret: boolean = bindings.Shutdown_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the Shutdown object into a byte array which can be read by Shutdown_read
         */
index 7008c6d682b0d4e76350164c698ff1225a3739de..afc28283463b4969aff807f9905d030d2abf9387 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ShutdownScript extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.ShutdownScript_free);
        }
 
@@ -404,6 +411,17 @@ export class ShutdownScript extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two ShutdownScripts contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: ShutdownScript): boolean {
+               const ret: boolean = bindings.ShutdownScript_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the ShutdownScript object into a byte array which can be read by ShutdownScript_read
         */
index 76c80dec22fec12a57c55718f55abb06e75a049b..490a57af366409b641aa8e96c808ceb9a744a1df 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface SignInterface {
 }
 
 class LDKSignHolder {
-       held: Sign;
+       held: Sign|null = null;
 }
 
 /**
@@ -400,13 +407,13 @@ class LDKSignHolder {
  */
 export class Sign extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKSign;
+       public bindings_instance: bindings.LDKSign|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Sign_free);
                this.bindings_instance = null;
        }
@@ -422,13 +429,13 @@ export class Sign extends CommonBase {
                        },
                } as bindings.LDKSign;
                const baseSign = BaseSign.new_impl(baseSign_impl, pubkeys, );
-               const ptr_idx: [bigint, number] = bindings.LDKSign_new(structImplementation, baseSign.instance_idx, pubkeys == null ? 0n : pubkeys.clone_ptr());
+               const ptr_idx: [bigint, number] = bindings.LDKSign_new(structImplementation, baseSign.instance_idx!, pubkeys == null ? 0n : pubkeys.clone_ptr());
 
                impl_holder.held = new Sign(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(baseSign);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index fec26016995b6774f3831a8a216a51e90fbb2bce..31044e648a23189f98b5a4a635af82af146b8cd9 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -382,7 +389,7 @@ import * as bindings from '../bindings.mjs'
  * may occur.
  */
 export class SignOrCreationError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SignOrCreationError_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SignOrCreationError_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): SignOrCreationError {
                const raw_ty: number = bindings.LDKSignOrCreationError_ty_from_ptr(ptr);
index db04f78ffd33dcf1d0cad49d78c81daeaeb588b7..86c337e74b32ef679e9db1c225601307628cef0d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -387,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class SignedRawInvoice extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.SignedRawInvoice_free);
        }
 
index 1524c1aaea5d0495f94dcbd5bf1ec021568dff9f..39b5486952435a8a70ca1d037d21fbd02eab96a6 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { PeerManager } from '../structs/PeerManager.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -417,7 +424,7 @@ export interface SocketDescriptorInterface {
 }
 
 class LDKSocketDescriptorHolder {
-       held: SocketDescriptor;
+       held: SocketDescriptor|null = null;
 }
 
 /**
@@ -436,13 +443,13 @@ class LDKSocketDescriptorHolder {
  */
 export class SocketDescriptor extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKSocketDescriptor;
+       public bindings_instance: bindings.LDKSocketDescriptor|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.SocketDescriptor_free);
                this.bindings_instance = null;
        }
@@ -475,7 +482,7 @@ export class SocketDescriptor extends CommonBase {
                impl_holder.held = new SocketDescriptor(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index 9a7692b2783fe1d495c82ddfdd1dbf48367ab234..a70438bf854c91b0c5a8d1320e7b24e30c33aa1b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -385,7 +392,7 @@ import * as bindings from '../bindings.mjs'
  * that txid/index, and any keys or other information required to sign.
  */
 export class SpendableOutputDescriptor extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.SpendableOutputDescriptor_free); }
+       protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.SpendableOutputDescriptor_free); }
        /* @internal */
        public static constr_from_ptr(ptr: bigint): SpendableOutputDescriptor {
                const raw_ty: number = bindings.LDKSpendableOutputDescriptor_ty_from_ptr(ptr);
@@ -446,6 +453,15 @@ export class SpendableOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two SpendableOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public eq(b: SpendableOutputDescriptor): boolean {
+               const ret: boolean = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               return ret;
+       }
+
        /**
         * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
         */
index 791828657b99c086504fe4ca28808531b6878564..5ce430a2a448ceea156daba944cca76e10410217 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class StaticPaymentOutputDescriptor extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.StaticPaymentOutputDescriptor_free);
        }
 
@@ -485,6 +492,17 @@ export class StaticPaymentOutputDescriptor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two StaticPaymentOutputDescriptors contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: StaticPaymentOutputDescriptor): boolean {
+               const ret: boolean = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
         */
index 99ca9a238efa6842d2d63402e2311fd98ceee1c2..fca2841eac722cf72582959878adf7b861676321 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free);
        }
 
index 2c2ca4e4a8035c540d2b4373ad0c5bfff703dda3..b9a4c4058a8bd485550ed9fbe4e1c04d34317ba8 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free);
        }
 
index d4a3ce2e67fe3f4307ec38c597078aef6d94dca7..62416e3614d05d504d7f8b40509a044a3c9c1f66 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class ThreeTuple_RawInvoice_u832InvoiceSignatureZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free);
        }
 
index 7fd0910672c594f8610a87cd8482de7e49e72a2c..2dd8661129a063ee810a76bc259e7979e9d24c95 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TrustedClosingTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.TrustedClosingTransaction_free);
        }
 
index e429778f994f13a4565128b1949a0eb83e0b06c9..ea5df0a77dbc2e7a082de9b80bf458c5515ad161 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TrustedCommitmentTransaction extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.TrustedCommitmentTransaction_free);
        }
 
index fe085883457cb720e8366257864a9d02fa4cd966..7a9d9d7006e9713c4973888152b2b302d968efe2 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_BlockHashChannelManagerZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_BlockHashChannelManagerZ_free);
        }
 
index b0f57886660413590377eb144fca50566188f268..df5b23a67e71ec6c0fe5e02259ebe7dd0a3df3a3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidC
 import { Balance } from '../structs/Balance.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_BlockHashChannelMonitorZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_BlockHashChannelMonitorZ_free);
        }
 
index 2536d933db9e5e661d01c5059b1d85226980c385..29ab2ce5082cfab169bce5cbf3f3201f625b0a15 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_OutPointScriptZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_OutPointScriptZ_free);
        }
 
index b9da10729fd6537e151cbfee09a1a8ea85226882..5af38c25a56fe2293630f2bf858f9f92d632c8cc 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_PaymentHashPaymentIdZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_PaymentHashPaymentIdZ_free);
        }
 
index ef5964bdd4cecd171ec5fa1e66d5360efced7d0a..45577a340d529a16500e8c57843a70b5ab93766d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_PaymentHashPaymentSecretZ_free);
        }
 
index d2c17dc1da1cb673220b5b88565e2c6a519d1cb7..d96f57dfe09c96f3e83b8a9779609ec400dd0575 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_TxidC
 import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_PublicKeyTypeZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_PublicKeyTypeZ_free);
        }
 
index c112d6b93f007ac64ea047e99fd6f5665ea4b072..60d22f68fa74b61e26064922b4d750444f36fdf3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_SignatureCVec_SignatureZZ_free);
        }
 
index 23f191387dc572c857a0c1e18af8ab79f3098284..d2b7842cfa3a08d4c9c4b5a91ab24bb951127310 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_C2Tuple_SignatureCVec_SignatureZZNoneZ } from '../structs/Result
 import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_SignatureSignatureZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_SignatureSignatureZ_free);
        }
 
index 7b0f4d424052d2e5ca516b5de81cd22ce0017e69..0ab411f749fd1a41be1952251fa09dcc8f0f3b45 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free);
        }
 
index d3c0a7b5dba94326ddc55cbddbe2ace5698f2fb1..0ab2e11eaaffeaf25c6ec87c7c2b53435c07857d 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free);
        }
 
index 4515e7d7321b70d6e071e4c62c641fe1d90b34fa..b094218dd9830d135d46de8afe948b4751cbb224 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_u32ScriptZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_u32ScriptZ_free);
        }
 
index bb77993caa6c4351e28b42a2f529080d358abb5a..b18d05aa2945f409248011599d6aff12a4d3eda3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_u32TxOutZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_u32TxOutZ_free);
        }
 
index ede81f3674a1c3de5c2db6944a073088d4328db1..ddfa2f1ace651870ebfed60bc804817644c59c48 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_u64u64Z extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_u64u64Z_free);
        }
 
index d5cb14af14dd5fb3c621c32d78b740ced6471cdd..eedfab6de1cc2e4a7cdabc45fa52520c23ac3a89 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
 import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TwoTuple_usizeTransactionZ extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.C2Tuple_usizeTransactionZ_free);
        }
 
index 4d17fabbd95757fd2bef2cf41279efa8ccae8dcb..47ed01b086e947e998791e06ed80fb3ff32489df 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -393,7 +400,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class TxCreationKeys extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.TxCreationKeys_free);
        }
 
@@ -491,6 +498,17 @@ export class TxCreationKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two TxCreationKeyss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: TxCreationKeys): boolean {
+               const ret: boolean = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        public clone_ptr(): bigint {
                const ret: bigint = bindings.TxCreationKeys_clone_ptr(this.ptr);
                return ret;
index dfc5fec3da5fc00e415fc983ece653610ed09649..9f66a2f5a7bc13773c673439d1094c0efaf33553 100644 (file)
@@ -1,7 +1,7 @@
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -384,7 +391,7 @@ export class TxOut extends CommonBase {
        public value: bigint;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.TxOut_free);
                this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
                this.value = bindings.TxOut_get_value(ptr);
index e2c58c38355b932527f46ac2878b832a1ad2a1b1..e2f67309db26c81cdb976d243236f7f5618e7b38 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -394,7 +401,7 @@ export interface TypeInterface {
 }
 
 class LDKTypeHolder {
-       held: Type;
+       held: Type|null = null;
 }
 
 /**
@@ -404,13 +411,13 @@ class LDKTypeHolder {
  */
 export class Type extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKType;
+       public bindings_instance: bindings.LDKType|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Type_free);
                this.bindings_instance = null;
        }
@@ -439,7 +446,7 @@ export class Type extends CommonBase {
                impl_holder.held = new Type(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index e59cbc116d02e2aead2b9096fb9fe8bd17b29110..d37b956c6ee380d012c813fcbec60cab9f41fd26 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UnsignedChannelAnnouncement extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UnsignedChannelAnnouncement_free);
        }
 
@@ -515,6 +522,17 @@ export class UnsignedChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedChannelAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UnsignedChannelAnnouncement): boolean {
+               const ret: boolean = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UnsignedChannelAnnouncement object into a byte array which can be read by UnsignedChannelAnnouncement_read
         */
index 670a1a7e345e0a15a671f9e88dc44917d99c29a9..070a13ea6d6f0c9aa5853904a9510b4ddce9b9cb 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UnsignedChannelUpdate extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UnsignedChannelUpdate_free);
        }
 
@@ -584,6 +591,17 @@ export class UnsignedChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedChannelUpdates contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UnsignedChannelUpdate): boolean {
+               const ret: boolean = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UnsignedChannelUpdate object into a byte array which can be read by UnsignedChannelUpdate_read
         */
index c7ba19a0c01c5301f9b98d85e36e37cdf4278f9f..3c2c4fa90e1e43454a15623c3b6f3862420a3c84 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UnsignedNodeAnnouncement extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UnsignedNodeAnnouncement_free);
        }
 
@@ -513,6 +520,17 @@ export class UnsignedNodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UnsignedNodeAnnouncements contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UnsignedNodeAnnouncement): boolean {
+               const ret: boolean = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UnsignedNodeAnnouncement object into a byte array which can be read by UnsignedNodeAnnouncement_read
         */
index 7fefca9fb7eb269e3002fedd0987e96c62164ec1..0543afcbad59b2d3a7a30f13e1d148ca7e6fa605 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UpdateAddHTLC extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UpdateAddHTLC_free);
        }
 
@@ -479,6 +486,17 @@ export class UpdateAddHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateAddHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UpdateAddHTLC): boolean {
+               const ret: boolean = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UpdateAddHTLC object into a byte array which can be read by UpdateAddHTLC_read
         */
index 1dfe9aa5c8f740419a3b60a911f8126d115cd064..91ebc5251130520022991bdaef6f380cc2321acc 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UpdateFailHTLC extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UpdateFailHTLC_free);
        }
 
@@ -433,6 +440,17 @@ export class UpdateFailHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFailHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UpdateFailHTLC): boolean {
+               const ret: boolean = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UpdateFailHTLC object into a byte array which can be read by UpdateFailHTLC_read
         */
index 249f0bb3b62ec3d764c23d402668b74c91d201f3..592df3d3d40ce22b1c6a6b774cccc46d7e11cca3 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UpdateFailMalformedHTLC extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UpdateFailMalformedHTLC_free);
        }
 
@@ -448,6 +455,17 @@ export class UpdateFailMalformedHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFailMalformedHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UpdateFailMalformedHTLC): boolean {
+               const ret: boolean = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UpdateFailMalformedHTLC object into a byte array which can be read by UpdateFailMalformedHTLC_read
         */
index 7cfa023c54d7641b74a3faf6323bf4735cb52692..ece4dcf9450528cac5bc66f5bcfe436fd4c55997 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UpdateFee extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UpdateFee_free);
        }
 
@@ -443,6 +450,17 @@ export class UpdateFee extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFees contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UpdateFee): boolean {
+               const ret: boolean = bindings.UpdateFee_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UpdateFee object into a byte array which can be read by UpdateFee_read
         */
index 7bd5539a7e6ea5a50e985eb43afa6c0b20e86619..27ac12ad8345951362cfdfe41bd8fe61231773b5 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UpdateFulfillHTLC extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UpdateFulfillHTLC_free);
        }
 
@@ -459,6 +466,17 @@ export class UpdateFulfillHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two UpdateFulfillHTLCs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: UpdateFulfillHTLC): boolean {
+               const ret: boolean = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the UpdateFulfillHTLC object into a byte array which can be read by UpdateFulfillHTLC_read
         */
index 566bb15adc7b1622082310b0762e46d65f1f4e64..37dd59ca451f3c9fd0184ad36bf2daef5e6263a7 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -386,7 +393,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class UserConfig extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.UserConfig_free);
        }
 
index 6768f9c3f422790cb71c9e3c209d81678a02a5db..4ffd127305ec8313d05e8c66fd7f1d4beb75c8bf 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -350,6 +355,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -364,6 +370,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -480,6 +487,39 @@ export class UtilMethods extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Fetches the set of [`NodeFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static constructor_provided_node_features(): NodeFeatures {
+               const ret: bigint = bindings.provided_node_features();
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static constructor_provided_channel_features(): ChannelFeatures {
+               const ret: bigint = bindings.provided_channel_features();
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Fetches the set of [`InitFeatures`] flags which are provided by or required by
+        * [`ChannelManager`].
+        */
+       public static constructor_provided_init_features(): InitFeatures {
+               const ret: bigint = bindings.provided_init_features();
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+               return ret_hu_conv;
+       }
+
        /**
         * Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
         */
@@ -745,12 +785,12 @@ export class UtilMethods extends CommonBase {
         * 
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[], logger: Logger, scorer: Score, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
+       public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[]|null, logger: Logger, scorer: Score, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
                const ret: bigint = bindings.find_route(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), logger == null ? 0n : CommonBase.get_ptr_of(logger), scorer == null ? 0n : CommonBase.get_ptr_of(scorer), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32)));
                const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, route_params);
                CommonBase.add_ref_from(ret_hu_conv, network_graph);
-               first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); });
+               if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); }) };
                CommonBase.add_ref_from(ret_hu_conv, logger);
                CommonBase.add_ref_from(ret_hu_conv, scorer);
                return ret_hu_conv;
@@ -776,11 +816,12 @@ export class UtilMethods extends CommonBase {
         * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
         * available and the current time is supplied by the caller.
         */
-       public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
-               const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs);
+       public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, logger: Logger, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
+               const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs);
                const ret_hu_conv: Result_InvoiceSignOrCreationErrorZ = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, channelmanager);
                CommonBase.add_ref_from(ret_hu_conv, keys_manager);
+               CommonBase.add_ref_from(ret_hu_conv, logger);
                CommonBase.add_ref_from(ret_hu_conv, description_hash);
                return ret_hu_conv;
        }
@@ -790,11 +831,12 @@ export class UtilMethods extends CommonBase {
         * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
         * available and the current time is supplied by the caller.
         */
-       public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
-               const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs);
+       public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, keys_manager: KeysInterface, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number): Result_InvoiceSignOrCreationErrorZ {
+               const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), keys_manager == null ? 0n : CommonBase.get_ptr_of(keys_manager), logger == null ? 0n : CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs);
                const ret_hu_conv: Result_InvoiceSignOrCreationErrorZ = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
                CommonBase.add_ref_from(ret_hu_conv, channelmanager);
                CommonBase.add_ref_from(ret_hu_conv, keys_manager);
+               CommonBase.add_ref_from(ret_hu_conv, logger);
                return ret_hu_conv;
        }
 
index cd0f89449280dbdaa0c1e5dddb65e116f3e5f84d..9e94fb34f7c723f94d90585502ea5fdede6bb812 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -108,7 +108,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -164,6 +163,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -383,7 +390,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class WarningMessage extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.WarningMessage_free);
        }
 
@@ -454,6 +461,17 @@ export class WarningMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two WarningMessages contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: WarningMessage): boolean {
+               const ret: boolean = bindings.WarningMessage_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Serialize the WarningMessage object into a byte array which can be read by WarningMessage_read
         */
index b830982d3de1e9fd16e327475e5b89297d11d7be..14456ac227de8fb1b260bdacb8c485f0d3e4271b 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -251,6 +251,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -258,6 +261,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,22 +395,22 @@ export interface WatchInterface {
         * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
         * calling [`block_connected`] and [`block_disconnected`] on the monitor.
         * 
-        * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+        * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
         * the given `funding_txo` has previously been registered via `watch_channel`.
         * 
         * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
         * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
         * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
         */
-       watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): Result_NoneChannelMonitorUpdateErrZ;
+       watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): ChannelMonitorUpdateStatus;
        /**Updates a channel identified by `funding_txo` by applying `update` to its monitor.
         * 
         * Implementations must call [`update_monitor`] with the given update. See
-        * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+        * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
         * 
         * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
         */
-       update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): Result_NoneChannelMonitorUpdateErrZ;
+       update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): ChannelMonitorUpdateStatus;
        /**Returns any monitor events since the last call. Subsequent calls must only return new
         * events.
         * 
@@ -412,13 +419,13 @@ export interface WatchInterface {
         * to disk.
         * 
         * For details on asynchronous [`ChannelMonitor`] updating and returning
-        * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
         */
        release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[];
 }
 
 class LDKWatchHolder {
-       held: Watch;
+       held: Watch|null = null;
 }
 
 /**
@@ -437,20 +444,20 @@ class LDKWatchHolder {
  * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing
  * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it
  * could result in a revoked transaction being broadcast, allowing the counterparty to claim all
- * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle
+ * funds in the channel. See [`ChannelMonitorUpdateStatus`] for more details about how to handle
  * multiple instances.
  * 
- * [`PermanentFailure`]: ChannelMonitorUpdateErr::PermanentFailure
+ * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
  */
 export class Watch extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKWatch;
+       public bindings_instance: bindings.LDKWatch|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.Watch_free);
                this.bindings_instance = null;
        }
@@ -459,23 +466,21 @@ export class Watch extends CommonBase {
        public static new_impl(arg: WatchInterface): Watch {
                const impl_holder: LDKWatchHolder = new LDKWatchHolder();
                let structImplementation = {
-                       watch_channel (funding_txo: bigint, monitor: bigint): bigint {
+                       watch_channel (funding_txo: bigint, monitor: bigint): ChannelMonitorUpdateStatus {
                                const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
                                CommonBase.add_ref_from(funding_txo_hu_conv, this);
                                const monitor_hu_conv: ChannelMonitor = new ChannelMonitor(null, monitor);
                                CommonBase.add_ref_from(monitor_hu_conv, this);
-                               const ret: Result_NoneChannelMonitorUpdateErrZ = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
-                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
-                               return result;
+                               const ret: ChannelMonitorUpdateStatus = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
+                               return ret;
                        },
-                       update_channel (funding_txo: bigint, update: bigint): bigint {
+                       update_channel (funding_txo: bigint, update: bigint): ChannelMonitorUpdateStatus {
                                const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
                                CommonBase.add_ref_from(funding_txo_hu_conv, this);
                                const update_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, update);
                                CommonBase.add_ref_from(update_hu_conv, this);
-                               const ret: Result_NoneChannelMonitorUpdateErrZ = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
-                               const result: bigint = ret == null ? 0n : ret.clone_ptr();
-                               return result;
+                               const ret: ChannelMonitorUpdateStatus = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
+                               return ret;
                        },
                        release_pending_monitor_events (): number {
                                const ret: ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] = arg.release_pending_monitor_events();
@@ -488,7 +493,7 @@ export class Watch extends CommonBase {
                impl_holder.held = new Watch(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
@@ -498,35 +503,33 @@ export class Watch extends CommonBase {
         * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
         * calling [`block_connected`] and [`block_disconnected`] on the monitor.
         * 
-        * Note: this interface MUST error with `ChannelMonitorUpdateErr::PermanentFailure` if
+        * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
         * the given `funding_txo` has previously been registered via `watch_channel`.
         * 
         * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
         * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
         * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
         */
-       public watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor == null ? 0n : CommonBase.get_ptr_of(monitor));
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+       public watch_channel(funding_txo: OutPoint, monitor: ChannelMonitor): ChannelMonitorUpdateStatus {
+               const ret: ChannelMonitorUpdateStatus = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), monitor == null ? 0n : CommonBase.get_ptr_of(monitor));
                CommonBase.add_ref_from(this, funding_txo);
                CommonBase.add_ref_from(this, monitor);
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
         * Updates a channel identified by `funding_txo` by applying `update` to its monitor.
         * 
         * Implementations must call [`update_monitor`] with the given update. See
-        * [`ChannelMonitorUpdateErr`] for invariants around returning an error.
+        * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
         * 
         * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
         */
-       public update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): Result_NoneChannelMonitorUpdateErrZ {
-               const ret: bigint = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), update == null ? 0n : CommonBase.get_ptr_of(update));
-               const ret_hu_conv: Result_NoneChannelMonitorUpdateErrZ = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
+       public update_channel(funding_txo: OutPoint, update: ChannelMonitorUpdate): ChannelMonitorUpdateStatus {
+               const ret: ChannelMonitorUpdateStatus = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo), update == null ? 0n : CommonBase.get_ptr_of(update));
                CommonBase.add_ref_from(this, funding_txo);
                CommonBase.add_ref_from(this, update);
-               return ret_hu_conv;
+               return ret;
        }
 
        /**
@@ -538,7 +541,7 @@ export class Watch extends CommonBase {
         * to disk.
         * 
         * For details on asynchronous [`ChannelMonitor`] updating and returning
-        * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
+        * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
         */
        public release_pending_monitor_events(): ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] {
                const ret: number = bindings.Watch_release_pending_monitor_events(this.ptr);
index 5d5f45ca9970536bb9bb9ad29e255b33bf95e9a4..e92d8bcbf4a11b9b3567f9cba334c2e5e574a6a1 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -393,7 +400,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class WatchedOutput extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.WatchedOutput_free);
        }
 
@@ -413,7 +420,7 @@ export class WatchedOutput extends CommonBase {
         * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public set_block_hash(val: Uint8Array): void {
+       public set_block_hash(val: Uint8Array|null): void {
                bindings.WatchedOutput_set_block_hash(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 32)));
        }
 
@@ -477,6 +484,17 @@ export class WatchedOutput extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Checks if two WatchedOutputs contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public eq(b: WatchedOutput): boolean {
+               const ret: boolean = bindings.WatchedOutput_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
+               CommonBase.add_ref_from(this, b);
+               return ret;
+       }
+
        /**
         * Checks if two WatchedOutputs contain equal inner contents.
         */
index a8dae4cd1f43c11a68ebd09c522ad36b524bcc35..aef4fc52f8d178e8c7d23ccc7ebc5fcd2011e850 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
@@ -165,6 +164,7 @@ import { Result_SignatureNoneZ } from '../structs/Result_SignatureNoneZ.mjs';
 import { TwoTuple_SignatureSignatureZ } from '../structs/TwoTuple_SignatureSignatureZ.mjs';
 import { Result_C2Tuple_SignatureSignatureZNoneZ } from '../structs/Result_C2Tuple_SignatureSignatureZNoneZ.mjs';
 import { Result_SecretKeyNoneZ } from '../structs/Result_SecretKeyNoneZ.mjs';
+import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
 import { Option_ScalarZ } from '../structs/Option_ScalarZ.mjs';
 import { Result_SharedSecretNoneZ } from '../structs/Result_SharedSecretNoneZ.mjs';
 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
@@ -252,6 +252,9 @@ import { Balance } from '../structs/Balance.mjs';
 import { TwoTuple_BlockHashChannelMonitorZ } from '../structs/TwoTuple_BlockHashChannelMonitorZ.mjs';
 import { Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.mjs';
 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
+import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
+import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
+import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
 import { Option_NetAddressZ } from '../structs/Option_NetAddressZ.mjs';
 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
@@ -259,6 +262,8 @@ import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErr
 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
 import { SendError } from '../structs/SendError.mjs';
 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
+import { GraphSyncError } from '../structs/GraphSyncError.mjs';
+import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
 import { Result_NoneErrorZ } from '../structs/Result_NoneErrorZ.mjs';
 import { Result_NetAddressDecodeErrorZ } from '../structs/Result_NetAddressDecodeErrorZ.mjs';
 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
@@ -349,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -363,6 +369,7 @@ import { MultiThreadedScoreLock } from '../structs/MultiThreadedScoreLock.mjs';
 import { ProbabilisticScoringParameters } from '../structs/ProbabilisticScoringParameters.mjs';
 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
 import { Destination } from '../structs/Destination.mjs';
+import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
 import { RawDataPart } from '../structs/RawDataPart.mjs';
 import { Sha256 } from '../structs/Sha256.mjs';
 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
@@ -388,7 +395,7 @@ export interface WriteableScoreInterface {
 }
 
 class LDKWriteableScoreHolder {
-       held: WriteableScore;
+       held: WriteableScore|null = null;
 }
 
 /**
@@ -399,13 +406,13 @@ class LDKWriteableScoreHolder {
  */
 export class WriteableScore extends CommonBase {
        /* @internal */
-       public bindings_instance?: bindings.LDKWriteableScore;
+       public bindings_instance: bindings.LDKWriteableScore|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {
+       constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.WriteableScore_free);
                this.bindings_instance = null;
        }
@@ -421,13 +428,13 @@ export class WriteableScore extends CommonBase {
                        },
                } as bindings.LDKWriteableScore;
                const lockableScore = LockableScore.new_impl(lockableScore_impl, );
-               const ptr_idx: [bigint, number] = bindings.LDKWriteableScore_new(structImplementation, lockableScore.instance_idx);
+               const ptr_idx: [bigint, number] = bindings.LDKWriteableScore_new(structImplementation, lockableScore.instance_idx!);
 
                impl_holder.held = new WriteableScore(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
                impl_holder.held.ptrs_to.push(lockableScore);
-               return impl_holder.held;
+               return impl_holder.held!;
        }
 
        /**
index a80f8a6b622d0748abe59616f6ae50cac8688f4f..db0fe326618841a51b77104421565428272a66a1 100644 (file)
@@ -3,18 +3,21 @@ import * as ldk from "../index.mjs";
 
 const tests: Array<Function> = [];
 
+function assert(val: boolean) {
+       if (!val) throw new Error("Assertion failed");
+}
 function array_eq(a: Uint8Array, b: Uint8Array): boolean {
        return a.length == b.length && a.every((v, idx) => v == b[idx]);
 }
 
 tests.push(async () => {
        const result = rawldk.CResult_boolLightningErrorZ_ok(true);
-       console.assert(rawldk.CResult_boolLightningErrorZ_is_ok(result));
-       console.assert(rawldk.CResult_boolLightningErrorZ_get_ok(result));
+       assert(rawldk.CResult_boolLightningErrorZ_is_ok(result));
+       assert(rawldk.CResult_boolLightningErrorZ_get_ok(result));
        rawldk.CResult_boolLightningErrorZ_free(result);
        const second_res = rawldk.CResult_boolLightningErrorZ_ok(false);
-       console.assert(rawldk.CResult_boolLightningErrorZ_is_ok(second_res));
-       console.assert(!rawldk.CResult_boolLightningErrorZ_get_ok(second_res));
+       assert(rawldk.CResult_boolLightningErrorZ_is_ok(second_res));
+       assert(!rawldk.CResult_boolLightningErrorZ_get_ok(second_res));
        rawldk.CResult_boolLightningErrorZ_free(second_res);
 
        return true;
@@ -66,12 +69,12 @@ class Node {
 }
 function get_chanman(): Node {
        const fee_est = ldk.FeeEstimator.new_impl({
-               get_est_sat_per_1000_weight(confirmation_target: ldk.ConfirmationTarget): number {
+               get_est_sat_per_1000_weight(_confirmation_target: ldk.ConfirmationTarget): number {
                        return 253;
                }
        } as ldk.FeeEstimatorInterface);
-       var tx_broadcaster;
-       const tx_broadcasted: Promise<Uint8Array> = new Promise((resolve, reject) => {
+       var tx_broadcaster: ldk.BroadcasterInterface;
+       const tx_broadcasted: Promise<Uint8Array> = new Promise((resolve, _reject) => {
                tx_broadcaster = ldk.BroadcasterInterface.new_impl({
                        broadcast_transaction(tx: Uint8Array): void { console.log("Tx Broadcast: " + tx); resolve(tx); }
                } as ldk.BroadcasterInterfaceInterface);
@@ -83,15 +86,15 @@ function get_chanman(): Node {
        } as ldk.LoggerInterface);
 
        const persister = ldk.Persist.new_impl({
-               persist_new_channel(channel_id: ldk.OutPoint, data: ldk.ChannelMonitor, update_id: ldk.MonitorUpdateId): ldk.Result_NoneChannelMonitorUpdateErrZ {
-                       return ldk.Result_NoneChannelMonitorUpdateErrZ.constructor_ok();
+               persist_new_channel(_channel_id: ldk.OutPoint, _data: ldk.ChannelMonitor, _update_id: ldk.MonitorUpdateId): ldk.ChannelMonitorUpdateStatus {
+                       return ldk.ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                },
-               update_persisted_channel(channel_id: ldk.OutPoint, update: ldk.ChannelMonitorUpdate, data: ldk.ChannelMonitor, update_id: ldk.MonitorUpdateId): ldk.Result_NoneChannelMonitorUpdateErrZ {
-                       return ldk.Result_NoneChannelMonitorUpdateErrZ.constructor_ok();
+               update_persisted_channel(_channel_id: ldk.OutPoint, _update: ldk.ChannelMonitorUpdate, _data: ldk.ChannelMonitor, _update_id: ldk.MonitorUpdateId): ldk.ChannelMonitorUpdateStatus {
+                       return ldk.ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
                }
        } as ldk.PersistInterface);
 
-       const chain_monitor = ldk.ChainMonitor.constructor_new(ldk.Option_FilterZ.constructor_none(), tx_broadcaster, logger, fee_est, persister);
+       const chain_monitor = ldk.ChainMonitor.constructor_new(ldk.Option_FilterZ.constructor_none(), tx_broadcaster!, logger, fee_est, persister);
        const chain_watch: ldk.Watch = chain_monitor.as_Watch();
 
        const seed = new Uint8Array(32);
@@ -102,7 +105,7 @@ function get_chanman(): Node {
        const config = ldk.UserConfig.constructor_default();
        const params = ldk.ChainParameters.constructor_new(ldk.Network.LDKNetwork_Testnet, ldk.BestBlock.constructor_from_genesis(ldk.Network.LDKNetwork_Testnet));
 
-       const chan_man = ldk.ChannelManager.constructor_new(fee_est, chain_watch, tx_broadcaster, logger, keys_interface, config, params);
+       const chan_man = ldk.ChannelManager.constructor_new(fee_est, chain_watch, tx_broadcaster!, logger, keys_interface, config, params);
        return new Node(chan_man, tx_broadcasted, logger, keys_interface);
 }
 
@@ -119,10 +122,12 @@ function exchange_messages(a: ldk.ChannelManager, b: ldk.ChannelManager) {
                                const msg = msgs[j];
                                if (msg instanceof ldk.MessageSendEvent_SendOpenChannel) {
                                        if (!array_eq(msg.node_id, to.get_our_node_id())) return false;
-                                       to.as_ChannelMessageHandler().handle_open_channel(from.get_our_node_id(), ldk.InitFeatures.constructor_known(), msg.msg);
+                                       const features = from.as_ChannelMessageHandler().provided_init_features(to.get_our_node_id());
+                                       to.as_ChannelMessageHandler().handle_open_channel(from.get_our_node_id(), features, msg.msg);
                                } else if (msg instanceof ldk.MessageSendEvent_SendAcceptChannel) {
                                        if (!array_eq(msg.node_id, to.get_our_node_id())) return false;
-                                       to.as_ChannelMessageHandler().handle_accept_channel(from.get_our_node_id(), ldk.InitFeatures.constructor_known(), msg.msg);
+                                       const features = from.as_ChannelMessageHandler().provided_init_features(to.get_our_node_id());
+                                       to.as_ChannelMessageHandler().handle_accept_channel(from.get_our_node_id(), features, msg.msg);
                                } else if (msg instanceof ldk.MessageSendEvent_SendFundingCreated) {
                                        if (!array_eq(msg.node_id, to.get_our_node_id())) return false;
                                        to.as_ChannelMessageHandler().handle_funding_created(from.get_our_node_id(), msg.msg);
@@ -158,16 +163,18 @@ function get_event(chan_man: ldk.ChannelManager): ldk.Event {
        } as ldk.EventHandlerInterface);
 
        chan_man.as_EventsProvider().process_pending_events(event_handler);
-       console.assert(events.length == 1);
-       return events[0];
+       assert(events.length == 1);
+       return events[0]!;
 }
 
 tests.push(async () => {
        const a = get_chanman();
        const b = get_chanman();
 
-       a.chan_man.as_ChannelMessageHandler().peer_connected(b.chan_man.get_our_node_id(), ldk.Init.constructor_new(ldk.InitFeatures.constructor_known(), ldk.Option_NetAddressZ.constructor_none()));
-       b.chan_man.as_ChannelMessageHandler().peer_connected(a.chan_man.get_our_node_id(), ldk.Init.constructor_new(ldk.InitFeatures.constructor_known(), ldk.Option_NetAddressZ.constructor_none()));
+       const features = a.chan_man.as_ChannelMessageHandler().provided_init_features(b.chan_man.get_our_node_id());
+
+       a.chan_man.as_ChannelMessageHandler().peer_connected(b.chan_man.get_our_node_id(), ldk.Init.constructor_new(features, ldk.Option_NetAddressZ.constructor_none()));
+       b.chan_man.as_ChannelMessageHandler().peer_connected(a.chan_man.get_our_node_id(), ldk.Init.constructor_new(features, ldk.Option_NetAddressZ.constructor_none()));
 
        const chan_create_err = a.chan_man.create_channel(b.chan_man.get_our_node_id(), BigInt(0), BigInt(400), BigInt(0), ldk.UserConfig.constructor_default());
        if (chan_create_err.is_ok()) return false;
@@ -214,17 +221,18 @@ tests.push(async () => {
        const b = get_chanman();
 
        const ignorer = ldk.IgnoringMessageHandler.constructor_new();
-       const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), a.node_secret, 0xdeadbeefn, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
-       const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), b.node_secret, 0xdeadbeefn, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
+       const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), a.node_secret, 0xdeadbeef, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
+       const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), b.node_secret, 0xdeadbeef, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
 
        var sock_b: ldk.SocketDescriptor;
        const sock_a = ldk.SocketDescriptor.new_impl({
                send_data(data: Uint8Array, resume_read: boolean): number {
-                       console.assert(pm_b.read_event(sock_b, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(pm_b.read_event(sock_b, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(resume_read);
                        return data.length;
                },
                disconnect_socket(): void {
-                       console.assert(false);
+                       assert(false);
                },
                eq(other: ldk.SocketDescriptor): boolean {
                        return other.hash() == this.hash();
@@ -235,11 +243,12 @@ tests.push(async () => {
        } as ldk.SocketDescriptorInterface);
        sock_b = ldk.SocketDescriptor.new_impl({
                send_data(data: Uint8Array, resume_read: boolean): number {
-                       console.assert(pm_a.read_event(sock_a, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(pm_a.read_event(sock_a, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(resume_read);
                        return data.length;
                },
                disconnect_socket(): void {
-                       console.assert(false);
+                       assert(false);
                },
                eq(other: ldk.SocketDescriptor): boolean {
                        return other.hash() == this.hash();
@@ -249,24 +258,32 @@ tests.push(async () => {
                }
        } as ldk.SocketDescriptorInterface);
 
+       const update_fut = a.chan_man.get_persistable_update_future();
+       var update_done = false;
+       update_fut.register_callback_fn(ldk.FutureCallback.new_impl({
+               call(): void { update_done = true; }
+       }));
+       if (update_done) return false;
+
        const v4_netaddr = ldk.NetAddress.constructor_ipv4(Uint8Array.from([42,0,42,1]), 9735);
-       console.assert(pm_b.new_inbound_connection(sock_b, ldk.Option_NetAddressZ.constructor_some(v4_netaddr)) instanceof ldk.Result_NonePeerHandleErrorZ_OK);
+       assert(pm_b.new_inbound_connection(sock_b, ldk.Option_NetAddressZ.constructor_some(v4_netaddr)) instanceof ldk.Result_NonePeerHandleErrorZ_OK);
        const init_bytes = pm_a.new_outbound_connection(b.node_id, sock_a, ldk.Option_NetAddressZ.constructor_none());
        if (!(init_bytes instanceof ldk.Result_CVec_u8ZPeerHandleErrorZ_OK)) return false;
-       console.assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+       assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
 
-       console.assert(pm_a.get_peer_node_ids().length == 0);
-       console.assert(pm_b.get_peer_node_ids().length == 0);
+       assert(pm_a.get_peer_node_ids().length == 0);
+       assert(pm_b.get_peer_node_ids().length == 0);
 
        pm_b.process_events();
        pm_a.process_events();
        pm_b.process_events();
 
-       console.assert(pm_a.get_peer_node_ids().length == 1);
-       console.assert(pm_b.get_peer_node_ids().length == 1);
+       assert(pm_a.get_peer_node_ids().length == 1);
+       assert(pm_b.get_peer_node_ids().length == 1);
 
        const chan_create_res = a.chan_man.create_channel(b.node_id, BigInt(1000000), BigInt(400), BigInt(0), ldk.UserConfig.constructor_default());
        if (!chan_create_res.is_ok()) return false;
+       if (!update_done) return false;
 
        pm_a.process_events();
        pm_b.process_events();
@@ -284,7 +301,24 @@ tests.push(async () => {
 
        const ignorer = ldk.IgnoringMessageHandler.constructor_new();
 
-       const underlying_om_a = ldk.OnionMessenger.constructor_new(a.keys_interface, a.logger);
+       var a_handled_msg = false;
+       const om_handler_a = ldk.CustomOnionMessageHandler.new_impl({
+               read_custom_message(message_type: bigint, buffer: Uint8Array): ldk.Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+                       assert(message_type == 4343n);
+                       assert(buffer.length == 44);
+                       for (var i = 0; i < 44; i++) assert(buffer[i] == 67);
+                       return ldk.Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constructor_ok(ldk.Option_CustomOnionMessageContentsZ.constructor_some(ldk.CustomOnionMessageContents.new_impl({
+                               tlv_type(): bigint { return 9998n; },
+                               write(): Uint8Array { throw new Error(); }
+                       } as ldk.CustomOnionMessageContentsInterface)));
+               },
+               handle_custom_message(msg: ldk.CustomOnionMessageContents) {
+                       assert(msg.tlv_type() == 9998n);
+                       a_handled_msg = true;
+               },
+       } as ldk.CustomOnionMessageHandlerInterface);
+
+       const underlying_om_a = ldk.OnionMessenger.constructor_new(a.keys_interface, a.logger, om_handler_a);
        const om_provider_a = {
                next_onion_message_for_peer(peer_node_id: Uint8Array): ldk.OnionMessage {
                        return underlying_om_a.as_OnionMessageProvider().next_onion_message_for_peer(peer_node_id);
@@ -294,8 +328,8 @@ tests.push(async () => {
                handle_onion_message(peer_node_id: Uint8Array, msg: ldk.OnionMessage) {
                        underlying_om_a.as_OnionMessageHandler().handle_onion_message(peer_node_id, msg);
                },
-               peer_connected(their_node_id: Uint8Array, init: ldk.Init) {
-                       underlying_om_a.as_OnionMessageHandler().peer_connected(their_node_id, init);
+               peer_connected(their_node_id: Uint8Array, init: ldk.Init): ldk.Result_NoneNoneZ {
+                       return underlying_om_a.as_OnionMessageHandler().peer_connected(their_node_id, init)
                },
                peer_disconnected(their_node_id: Uint8Array, no_connection_possible: boolean) {
                        underlying_om_a.as_OnionMessageHandler().peer_disconnected(their_node_id, no_connection_possible);
@@ -308,19 +342,36 @@ tests.push(async () => {
                }
        } as ldk.OnionMessageHandlerInterface, om_provider_a);
 
-       const om_b = ldk.OnionMessenger.constructor_new(b.keys_interface, b.logger);
+       var b_handled_msg = false;
+       const om_handler_b = ldk.CustomOnionMessageHandler.new_impl({
+               read_custom_message(message_type: bigint, buffer: Uint8Array): ldk.Result_COption_CustomOnionMessageContentsZDecodeErrorZ {
+                       assert(message_type == 4242n);
+                       assert(buffer.length == 43);
+                       for (var i = 0; i < 43; i++) assert(buffer[i] == 66);
+                       return ldk.Result_COption_CustomOnionMessageContentsZDecodeErrorZ.constructor_ok(ldk.Option_CustomOnionMessageContentsZ.constructor_some(ldk.CustomOnionMessageContents.new_impl({
+                               tlv_type(): bigint { return 9999n; },
+                               write(): Uint8Array { throw new Error(); }
+                       } as ldk.CustomOnionMessageContentsInterface)));
+               },
+               handle_custom_message(msg: ldk.CustomOnionMessageContents) {
+                       assert(msg.tlv_type() == 9999n);
+                       b_handled_msg = true;
+               },
+       } as ldk.CustomOnionMessageHandlerInterface);
+       const om_b = ldk.OnionMessenger.constructor_new(b.keys_interface, b.logger, om_handler_b);
 
-       const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), om_a, a.node_secret, 0xdeadbeefn, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
-       const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), om_b.as_OnionMessageHandler(), b.node_secret, 0xdeadbeefn, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
+       const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), om_a, a.node_secret, 0xdeadbeef, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
+       const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), om_b.as_OnionMessageHandler(), b.node_secret, 0xdeadbeef, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
 
        var sock_b: ldk.SocketDescriptor;
        const sock_a = ldk.SocketDescriptor.new_impl({
                send_data(data: Uint8Array, resume_read: boolean): number {
-                       console.assert(pm_b.read_event(sock_b, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(pm_b.read_event(sock_b, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(resume_read);
                        return data.length;
                },
                disconnect_socket(): void {
-                       console.assert(false);
+                       assert(false);
                },
                eq(other: ldk.SocketDescriptor): boolean {
                        return other.hash() == this.hash();
@@ -331,11 +382,12 @@ tests.push(async () => {
        } as ldk.SocketDescriptorInterface);
        sock_b = ldk.SocketDescriptor.new_impl({
                send_data(data: Uint8Array, resume_read: boolean): number {
-                       console.assert(pm_a.read_event(sock_a, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(pm_a.read_event(sock_a, data) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+                       assert(resume_read);
                        return data.length;
                },
                disconnect_socket(): void {
-                       console.assert(false);
+                       assert(false);
                },
                eq(other: ldk.SocketDescriptor): boolean {
                        return other.hash() == this.hash();
@@ -346,28 +398,42 @@ tests.push(async () => {
        } as ldk.SocketDescriptorInterface);
 
        const v4_netaddr = ldk.NetAddress.constructor_ipv4(Uint8Array.from([42,0,42,1]), 9735);
-       console.assert(pm_b.new_inbound_connection(sock_b, ldk.Option_NetAddressZ.constructor_some(v4_netaddr)) instanceof ldk.Result_NonePeerHandleErrorZ_OK);
+       assert(pm_b.new_inbound_connection(sock_b, ldk.Option_NetAddressZ.constructor_some(v4_netaddr)) instanceof ldk.Result_NonePeerHandleErrorZ_OK);
        const init_bytes = pm_a.new_outbound_connection(b.node_id, sock_a, ldk.Option_NetAddressZ.constructor_none());
        if (!(init_bytes instanceof ldk.Result_CVec_u8ZPeerHandleErrorZ_OK)) return false;
-       console.assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
+       assert(pm_b.read_event(sock_b, init_bytes.res) instanceof ldk.Result_boolPeerHandleErrorZ_OK);
 
-       console.assert(pm_a.get_peer_node_ids().length == 0);
-       console.assert(pm_b.get_peer_node_ids().length == 0);
+       assert(pm_a.get_peer_node_ids().length == 0);
+       assert(pm_b.get_peer_node_ids().length == 0);
 
        pm_b.process_events();
        pm_a.process_events();
        pm_b.process_events();
 
-       console.assert(pm_a.get_peer_node_ids().length == 1);
-       console.assert(pm_b.get_peer_node_ids().length == 1);
+       assert(pm_a.get_peer_node_ids().length == 1);
+       assert(pm_b.get_peer_node_ids().length == 1);
 
-       underlying_om_a.send_onion_message([], ldk.Destination.constructor_node(b.node_id), null);
+       underlying_om_a.send_custom_onion_message([], ldk.Destination.constructor_node(b.node_id), ldk.CustomOnionMessageContents.new_impl({
+                       tlv_type(): bigint { return 4242n; },
+                       write(): Uint8Array {
+                               const ret = new Uint8Array(43);
+                               for (var i = 0; i < 43; i++) ret[i] = 66;
+                               return ret;
+                       }
+               } as ldk.CustomOnionMessageContentsInterface), null);
        pm_a.process_events();
-       om_b.send_onion_message([], ldk.Destination.constructor_node(a.node_id), null);
+       assert(b_handled_msg);
+
+       om_b.send_custom_onion_message([], ldk.Destination.constructor_node(a.node_id), ldk.CustomOnionMessageContents.new_impl({
+                       tlv_type(): bigint { return 4343n; },
+                       write(): Uint8Array {
+                               const ret = new Uint8Array(44);
+                               for (var i = 0; i < 44; i++) ret[i] = 67;
+                               return ret;
+                       }
+               } as ldk.CustomOnionMessageContentsInterface), null);
        pm_b.process_events();
-
-       // TODO: Once OnionMessenger supports actually passing messages up, check that we received the
-       // messages here.
+       assert(a_handled_msg);
 
        return true;
 });
@@ -401,7 +467,7 @@ async function run_tests(check_leaks: boolean) {
        console.log("all tests passed: " + result);
        if (result !== true || !check_leaks) { return result; }
 
-       const allocs_finished = new Promise((resolve, reject) => {
+       const allocs_finished = new Promise((resolve, _reject) => {
                var loop_count = 0;
                const interval_id = setInterval(() => {
                        const alloc_count = rawldk.getRemainingAllocationCount();
index a2867b849f45006c7eee061f719c8a75e7ec79f4..57c75ee762c8a1886cca487716eeabe2d45dcb06 100644 (file)
     "declaration": true,
     "strict": true,
     "noImplicitAny": true,
-    "strictNullChecks": false,
+    "strictNullChecks": true,
     "strictFunctionTypes": true,
     "strictBindCallApply": true,
-    "strictPropertyInitialization": false,
+    "strictPropertyInitialization": true,
     "noImplicitThis": true,
     "useUnknownInCatchVariables": true,
     "alwaysStrict": true,
     "noUnusedLocals": false,
     "noUnusedParameters": false,
-    "exactOptionalPropertyTypes": false,
+    "exactOptionalPropertyTypes": true,
     "noImplicitReturns": true,
     "noFallthroughCasesInSwitch": true,
     "noUncheckedIndexedAccess": true,
@@ -29,6 +29,6 @@
     "allowUnusedLabels": false,
     "allowUnreachableCode": false,
 
-    "skipLibCheck": true
+    "skipLibCheck": false
   }
 }
index 84dd9a1565f5d61860bc4edecdfb7fb59b9014a9..64eae1fa4de7542a57e8fbe70586c14186ade47a 100644 (file)
@@ -53,7 +53,7 @@ imports.wasi_snapshot_preview1 = {
                for (var i = 0; i < iovec_array_len; i++) {
                        const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
                        console.log("[fd " + fd + "]: " + String.fromCharCode(...bytes_view));
-                       bytes_written += ptr_len_view[i*2+1];
+                       bytes_written += ptr_len_view[i*2+1]!;
                }
                const written_view = new Uint32Array(wasm.memory.buffer, bytes_written_ptr, 1);
                written_view[0] = bytes_written;
@@ -82,7 +82,7 @@ imports.wasi_snapshot_preview1 = {
                out_len_view[0] = 0;
                return 0;
        },
-       "environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
+       "environ_get": (_environ_ptr: number, _environ_buf_ptr: number) => {
                // This is called before fd_write to format + print panic messages,
                // but only if we have variables in environ_sizes_get, so shouldn't ever actually happen!
                console.log("wasi_snapshot_preview1:environ_get");
@@ -150,7 +150,7 @@ export async function initializeWasmFetch(uri: string) {
 export function uint5ArrToBytes(inputArray: Array<UInt5>): Uint8Array {
        const arr = new Uint8Array(inputArray.length);
        for (var i = 0; i < inputArray.length; i++) {
-               arr[i] = inputArray[i].getVal();
+               arr[i] = inputArray[i]!.getVal();
        }
        return arr;
 }
@@ -159,7 +159,7 @@ export function uint5ArrToBytes(inputArray: Array<UInt5>): Uint8Array {
 export function WitnessVersionArrToBytes(inputArray: Array<WitnessVersion>): Uint8Array {
        const arr = new Uint8Array(inputArray.length);
        for (var i = 0; i < inputArray.length; i++) {
-               arr[i] = inputArray[i].getVal();
+               arr[i] = inputArray[i]!.getVal();
        }
        return arr;
 }
@@ -167,7 +167,8 @@ export function WitnessVersionArrToBytes(inputArray: Array<WitnessVersion>): Uin
 
 
 /* @internal */
-export function encodeUint8Array (inputArray: Uint8Array): number {
+export function encodeUint8Array (inputArray: Uint8Array|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc(inputArray.length + 8);
        const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
        arrayLengthView[0] = BigInt(inputArray.length);
@@ -176,7 +177,8 @@ export function encodeUint8Array (inputArray: Uint8Array): number {
        return cArrayPointer;
 }
 /* @internal */
-export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
+export function encodeUint32Array (inputArray: Uint32Array|Array<number>|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc((inputArray.length + 2) * 4);
        const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
        arrayLengthView[0] = BigInt(inputArray.length);
@@ -185,24 +187,25 @@ export function encodeUint32Array (inputArray: Uint32Array|Array<number>): numbe
        return cArrayPointer;
 }
 /* @internal */
-export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
+export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>|null): number {
+       if (inputArray == null) return 0;
        const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 8);
-       const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
-       arrayMemoryView.set(inputArray, 1);
+       const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, inputArray.length + 1);
        arrayMemoryView[0] = BigInt(inputArray.length);
+       arrayMemoryView.set(inputArray, 1);
        return cArrayPointer;
 }
 
 /* @internal */
-export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
-       if (arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
+export function check_arr_len(arr: Uint8Array|null, len: number): Uint8Array|null {
+       if (arr !== null && arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
        return arr;
 }
 
 /* @internal */
 export function getArrayLength(arrayPointer: number): number {
        const arraySizeViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer, 1);
-       const len = arraySizeViewer[0];
+       const len = arraySizeViewer[0]!;
        if (len >= (2n ** 32n)) throw new Error("Bogus Array Size");
        return Number(len % (2n ** 32n));
 }
@@ -257,19 +260,19 @@ export function freeWasmMemory(pointer: number) { wasm.TS_free(pointer); }
 /* @internal */
 export function getU64ArrayElem(arrayPointer: number, idx: number): bigint {
        const actualArrayViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 /* @internal */
 export function getU32ArrayElem(arrayPointer: number, idx: number): number {
        const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 /* @internal */
 export function getU8ArrayElem(arrayPointer: number, idx: number): number {
        const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
-       return actualArrayViewer[idx];
+       return actualArrayViewer[idx]!;
 }
 
 
@@ -347,8 +350,8 @@ export class CommonBase {
        // In Java, protected means "any subclass can access fields on any other subclass'"
        // In TypeScript, protected means "any subclass can access parent fields on instances of itself"
        // To work around this, we add accessors for other instances' protected fields here.
-       protected static add_ref_from(holder: CommonBase, referent: object) {
-               if (holder !== null) { holder.ptrs_to.push(referent); }
+       protected static add_ref_from(holder: CommonBase|null, referent: object|null) {
+               if (holder !== null && referent !== null) { holder.ptrs_to.push(referent); }
        }
        protected static get_ptr_of(o: CommonBase) {
                return o.ptr;
@@ -381,7 +384,7 @@ export class WitnessVersion {
 }
 
 export class UnqualifiedError {
-       public constructor(val: number) {}
+       public constructor(_val: number) {}
 }
 """
 
@@ -392,7 +395,7 @@ export class UnqualifiedError {
        public value: bigint;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.TxOut_free);
                this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
                this.value = bindings.TxOut_get_value(ptr);
@@ -408,7 +411,7 @@ export class UnqualifiedError {
        public scalar_bytes: Uint8Array;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.BigEndianScalar_free);
                this.scalar_bytes = bindings.decodeUint8Array(bindings.BigEndianScalar_get_bytes(ptr));
        }
@@ -871,7 +874,7 @@ export enum {struct_name} {{
                 else:
                     bindings_instantiator += ", " + first_to_lower(var.arg_name)
             else:
-                bindings_instantiator += ", " + first_to_lower(var[1]) + ".instance_idx"
+                bindings_instantiator += ", " + first_to_lower(var[1]) + ".instance_idx!"
                 super_instantiator += first_to_lower(var[1]) + "_impl, "
                 pointer_to_adder += "\t\timpl_holder.held.ptrs_to.push(" + first_to_lower(var[1]) + ");\n"
                 impl_constructor_arguments += f", {first_to_lower(var[1])}_impl: {var[0].replace('LDK', '')}Interface"
@@ -883,7 +886,7 @@ export enum {struct_name} {{
                 trait_constructor_arguments += ", " + var.arg_name
             else:
                 super_constructor_statements += "\t\tconst " + first_to_lower(var[1]) + " = " + var[1] + ".new_impl(" + super_instantiator + ");\n"
-                trait_constructor_arguments += ", " + first_to_lower(var[1]) + ".instance_idx"
+                trait_constructor_arguments += ", " + first_to_lower(var[1]) + ".instance_idx!"
                 for suparg in var[2]:
                     if isinstance(suparg, ConvInfo):
                         trait_constructor_arguments += ", " + suparg.arg_name
@@ -955,7 +958,7 @@ export interface {struct_name.replace("LDK", "")}Interface {{
 {out_java_interface}}}
 
 class {struct_name}Holder {{
-       held: {struct_name.replace("LDK", "")};
+       held: {struct_name.replace("LDK", "")}|null = null;
 }}
 
 /**
@@ -963,13 +966,13 @@ class {struct_name}Holder {{
  */
 export class {struct_name.replace("LDK","")} extends CommonBase {{
        /* @internal */
-       public bindings_instance?: bindings.{struct_name};
+       public bindings_instance: bindings.{struct_name}|null;
 
        /* @internal */
        public instance_idx?: number;
 
        /* @internal */
-       constructor(_dummy: object, ptr: bigint) {{
+       constructor(_dummy: null, ptr: bigint) {{
                super(ptr, bindings.{struct_name.replace("LDK","")}_free);
                this.bindings_instance = null;
        }}
@@ -984,7 +987,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
                impl_holder.held = new {struct_name.replace("LDK", "")}(null, ptr_idx[0]);
                impl_holder.held.instance_idx = ptr_idx[1];
                impl_holder.held.bindings_instance = structImplementation;
-{pointer_to_adder}             return impl_holder.held;
+{pointer_to_adder}             return impl_holder.held!;
        }}
 
 """
@@ -1087,7 +1090,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
                     out_c = out_c + "\tjs_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
                 elif fn_line.ret_ty_info.java_hu_ty == "string":
                     out_c += "\tjstring ret = (jstring)js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
-                elif not fn_line.ret_ty_info.passed_as_ptr:
+                elif fn_line.ret_ty_info.arg_conv is None:
                     out_c += "\treturn js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
                 else:
                     out_c += "\tuint64_t ret = js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
@@ -1211,7 +1214,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
 
         java_hu_class = "/**\n * " + enum_doc_comment.replace("\n", "\n * ") + "\n */\n"
         java_hu_class += "export class " + java_hu_type + " extends CommonBase {\n"
-        java_hu_class += "\tprotected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings." + bindings_type + "_free); }\n"
+        java_hu_class += "\tprotected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings." + bindings_type + "_free); }\n"
         java_hu_class += "\t/* @internal */\n"
         java_hu_class += f"\tpublic static constr_from_ptr(ptr: bigint): {java_hu_type} {{\n"
         java_hu_class += f"\t\tconst raw_ty: number = bindings." + struct_name + "_ty_from_ptr(ptr);\n"
@@ -1303,7 +1306,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
  */
 export class {hu_name} extends CommonBase {implementations}{{
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {{
+       public constructor(_dummy: null, ptr: bigint) {{
                {constructor_body}
        }}{extra_body}
 
@@ -1322,7 +1325,7 @@ export class {hu_name} extends CommonBase {implementations}{{
             suffixes += "\tpublic res: " + res_map.java_hu_ty + ";\n"
         suffixes += f"""
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {{
+       public constructor(_dummy: null, ptr: bigint) {{
                super(_dummy, ptr);
 """
         if res_map.java_hu_ty == "void":
@@ -1340,7 +1343,7 @@ export class {hu_name} extends CommonBase {implementations}{{
             suffixes += "\tpublic err: " + err_map.java_hu_ty + ";\n"
         suffixes += f"""
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {{
+       public constructor(_dummy: null, ptr: bigint) {{
                super(_dummy, ptr);
 """
         if err_map.java_hu_ty == "void":
@@ -1359,7 +1362,7 @@ export class {hu_name} extends CommonBase {implementations}{{
         return f"""{self.hu_struct_file_prefix}
 
 export class {human_ty} extends CommonBase {{
-       protected constructor(_dummy: object, ptr: bigint) {{
+       protected constructor(_dummy: null, ptr: bigint) {{
                super(ptr, bindings.{struct_name.replace("LDK","")}_free);
        }}
        /* @internal */
@@ -1440,6 +1443,8 @@ export function {method_name}({method_argument_string}): {return_java_ty} {{
                             out_java_struct += arg.arg_name + "_" + explode_arg.arg_name + ": " + explode_arg.java_hu_ty
                     else:
                         out_java_struct += arg.arg_name + ": " + arg.java_hu_ty
+                        if arg.nullable:
+                            out_java_struct += "|null"
 
         out_c += (") {\n")
         if out_java_struct is not None:
@@ -1546,12 +1551,12 @@ export function {method_name}({method_argument_string}): {return_java_ty} {{
             bindings.write("""
 
 js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: bigint|number, arg3: bigint|number, arg4: bigint|number, arg5: bigint|number, arg6: bigint|number, arg7: bigint|number, arg8: bigint|number, arg9: bigint|number, arg10: bigint|number) {
-       const weak: WeakRef<object> = js_objs[obj_ptr];
+       const weak: WeakRef<object>|undefined = js_objs[obj_ptr];
        if (weak == null || weak == undefined) {
                console.error("Got function call on unknown/free'd JS object!");
                throw new Error("Got function call on unknown/free'd JS object!");
        }
-       const obj: object = weak.deref();
+       const obj = weak.deref();
        if (obj == null || obj == undefined) {
                console.error("Got function call on GC'd JS object!");
                throw new Error("Got function call on GC'd JS object!");