[TS] Update auto-generated TS bindings
authorMatt Corallo <git@bluematt.me>
Thu, 27 Oct 2022 18:35:55 +0000 (18:35 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 28 Oct 2022 19:43:41 +0000 (19:43 +0000)
380 files changed:
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
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
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
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

index d0d24f722fdce59e153defba0351d5e0752f835a..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();
        }
 }
@@ -6674,10 +6731,7 @@ uint32_t __attribute__((export_name("TS_LDKGraphSyncError_ty_from_ptr"))) TS_LDK
 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);
-                       LDKDecodeError decode_error_var = obj->decode_error;
-                       uint64_t decode_error_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
-                       decode_error_ref = tag_ptr(decode_error_var.inner, false);
+                       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) {
@@ -6743,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;
 }
 
@@ -6799,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;
 }
 
@@ -6827,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;
 }
 
@@ -6855,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;
 }
 
@@ -6883,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;
 }
 
@@ -6911,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;
 }
 
@@ -6939,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;
 }
 
@@ -6967,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;
 }
 
@@ -6995,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;
 }
 
@@ -7023,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;
 }
 
@@ -7051,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;
 }
 
@@ -7079,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;
 }
 
@@ -7107,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;
 }
 
@@ -7135,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;
 }
 
@@ -7163,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;
 }
 
@@ -7191,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;
 }
 
@@ -7219,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;
 }
 
@@ -7247,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;
 }
 
@@ -7275,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;
 }
 
@@ -7303,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;
 }
 
@@ -7331,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;
 }
 
@@ -7359,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;
 }
 
@@ -7387,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;
 }
 
@@ -7415,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;
 }
 
@@ -7443,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;
 }
 
@@ -7471,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;
 }
 
@@ -7499,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;
 }
 
@@ -7527,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;
 }
 
@@ -7555,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;
 }
 
@@ -7583,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;
 }
 
@@ -7611,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;
 }
 
@@ -7639,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;
 }
 
@@ -7667,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;
 }
 
@@ -7695,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;
 }
 
@@ -7723,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;
 }
 
@@ -7793,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;
@@ -7801,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;
@@ -7914,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)
@@ -7987,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);
@@ -8044,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;
@@ -8089,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;
@@ -8153,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;
@@ -8171,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;
@@ -8188,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;
@@ -8206,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;
@@ -8223,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");
@@ -8402,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);
@@ -8456,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");
@@ -8515,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);
@@ -8529,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);
@@ -8540,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);
@@ -8622,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;
@@ -8678,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;
@@ -8686,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;
@@ -8793,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)
@@ -8929,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;
@@ -8944,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;
@@ -8971,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) {
@@ -9000,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;
@@ -9019,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;
@@ -9048,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 {
@@ -9077,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;
@@ -9092,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;
@@ -9103,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;
@@ -9114,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;
@@ -9125,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;
@@ -9141,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;
@@ -9152,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;
@@ -9163,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;
@@ -9174,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;
@@ -9185,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;
@@ -9196,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;
@@ -9207,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;
@@ -9218,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;
@@ -9229,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;
@@ -9240,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);
@@ -9258,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;
@@ -9269,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;
@@ -9280,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;
@@ -9291,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);
@@ -9306,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);
@@ -9608,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;
@@ -9620,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) {
@@ -9711,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);
@@ -9725,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);
@@ -9739,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);
@@ -9749,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);
@@ -9760,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);
@@ -9776,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;
@@ -9786,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);
@@ -9801,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);
@@ -9816,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);
@@ -9831,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);
@@ -9840,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);
@@ -9851,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);
@@ -9959,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;
@@ -9971,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) {
@@ -10087,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);
@@ -10098,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);
@@ -10120,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);
@@ -10170,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;
@@ -10182,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) {
@@ -10236,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);
@@ -10294,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);
@@ -10303,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)
@@ -10384,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;
@@ -10400,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;
@@ -10576,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);
@@ -10584,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)
@@ -10614,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);
@@ -10630,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);
@@ -10646,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);
@@ -10657,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;
@@ -10818,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);
@@ -10841,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;
@@ -10858,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;
@@ -10875,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;
@@ -10893,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;
@@ -11246,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);
@@ -11284,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);
@@ -11366,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);
@@ -11519,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);
@@ -11574,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);
@@ -11723,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);
@@ -11793,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);
@@ -11848,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);
@@ -11922,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);
@@ -11977,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);
@@ -12065,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);
@@ -12213,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);
@@ -12323,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);
@@ -12430,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);
@@ -12485,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);
@@ -12619,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);
@@ -12694,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);
@@ -12749,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);
@@ -12878,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);
@@ -12979,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);
@@ -13080,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);
@@ -13248,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);
@@ -13438,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;
@@ -13593,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);
@@ -13749,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);
@@ -13786,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);
@@ -13841,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);
@@ -13896,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);
@@ -13951,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);
@@ -14006,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);
@@ -14061,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);
@@ -14115,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);
@@ -14395,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);
@@ -14450,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);
@@ -14505,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);
@@ -14580,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);
@@ -14635,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);
@@ -14690,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);
@@ -14746,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);
@@ -14842,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);
@@ -14897,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);
@@ -14951,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);
@@ -15297,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);
@@ -15386,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);
@@ -15595,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);
@@ -16409,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);
@@ -16464,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);
@@ -16519,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);
@@ -16574,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);
@@ -16672,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);
@@ -16709,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);
@@ -16764,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);
@@ -16868,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);
@@ -16976,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);
@@ -17585,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);
@@ -17686,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);
@@ -17741,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);
@@ -18197,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);
@@ -18303,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);
@@ -18623,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);
@@ -18758,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);
@@ -18813,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);
@@ -18868,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);
@@ -18923,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);
@@ -18978,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);
@@ -19033,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);
@@ -19088,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);
@@ -19143,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);
@@ -19198,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);
@@ -19253,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);
@@ -19308,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);
@@ -19363,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);
@@ -19418,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);
@@ -19473,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);
@@ -19528,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);
@@ -19583,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);
@@ -19638,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);
@@ -19693,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);
@@ -19748,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);
@@ -19803,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);
@@ -19858,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);
@@ -19913,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);
@@ -19968,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);
@@ -20023,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);
@@ -20078,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);
@@ -20133,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);
@@ -20188,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);
@@ -20243,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);
@@ -20298,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);
@@ -20353,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);
@@ -20408,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);
@@ -20463,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);
@@ -20518,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);
@@ -20573,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);
@@ -20911,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);
@@ -20989,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);
@@ -21808,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;
 }
@@ -21827,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);
@@ -21900,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);
@@ -22812,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;
@@ -23088,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);
@@ -23172,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_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+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_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_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_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;
 }
 
@@ -23339,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);
@@ -23804,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;
 }
@@ -23828,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);
@@ -23885,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);
@@ -24871,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);
@@ -25045,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);
@@ -25137,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);
@@ -27794,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);
@@ -28206,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);
@@ -28350,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);
@@ -28445,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);
@@ -28540,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);
@@ -28624,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);
@@ -28689,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);
@@ -29128,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);
@@ -29487,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);
@@ -29630,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);
@@ -29728,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);
@@ -29855,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);
@@ -29956,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);
@@ -30040,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);
@@ -30189,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);
@@ -30330,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);
@@ -30391,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);
@@ -30508,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);
@@ -30588,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);
@@ -30687,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);
@@ -30844,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);
@@ -30968,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);
@@ -31059,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);
@@ -31157,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);
@@ -31256,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);
@@ -31399,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);
@@ -31480,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);
@@ -31698,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);
@@ -31802,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);
@@ -32001,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);
@@ -32183,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);
@@ -32437,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);
@@ -32541,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);
@@ -32651,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);
@@ -32832,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);
@@ -32956,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);
@@ -33047,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);
@@ -33157,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);
@@ -33713,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);
@@ -34601,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);
@@ -34883,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);
@@ -35438,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;
@@ -35667,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);
@@ -35902,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);
@@ -36822,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;
@@ -37462,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;
@@ -37486,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);
@@ -37512,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);
@@ -37538,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);
@@ -37564,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);
@@ -37590,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);
@@ -39043,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);
@@ -39423,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);
@@ -39739,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);
@@ -39987,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);
@@ -40563,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);
@@ -40658,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);
@@ -40843,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);
@@ -41065,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) {
@@ -43134,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);
@@ -43587,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();
@@ -43594,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);
@@ -43609,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);
@@ -43641,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);
 }
 
@@ -43673,6 +44739,37 @@ 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);
@@ -43749,11 +44846,10 @@ uint64_t  __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncEr
 }
 
 uint64_t  __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_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);
        uint64_t ret_ref = tag_ptr(ret_copy, true);
@@ -43935,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);
@@ -43983,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);
@@ -46029,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);
@@ -46042,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);
@@ -46053,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);
@@ -46070,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);
@@ -46077,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 41f2c977f75681bca799766c9d0814a3ccbcb1dc..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();
        }
 }
@@ -6672,10 +6729,7 @@ uint32_t __attribute__((export_name("TS_LDKGraphSyncError_ty_from_ptr"))) TS_LDK
 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);
-                       LDKDecodeError decode_error_var = obj->decode_error;
-                       uint64_t decode_error_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(decode_error_var);
-                       decode_error_ref = tag_ptr(decode_error_var.inner, false);
+                       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) {
@@ -6741,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;
 }
 
@@ -6797,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;
 }
 
@@ -6825,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;
 }
 
@@ -6853,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;
 }
 
@@ -6881,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;
 }
 
@@ -6909,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;
 }
 
@@ -6937,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;
 }
 
@@ -6965,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;
 }
 
@@ -6993,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;
 }
 
@@ -7021,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;
 }
 
@@ -7049,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;
 }
 
@@ -7077,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;
 }
 
@@ -7105,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;
 }
 
@@ -7133,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;
 }
 
@@ -7161,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;
 }
 
@@ -7189,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;
 }
 
@@ -7217,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;
 }
 
@@ -7245,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;
 }
 
@@ -7273,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;
 }
 
@@ -7301,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;
 }
 
@@ -7329,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;
 }
 
@@ -7357,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;
 }
 
@@ -7385,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;
 }
 
@@ -7413,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;
 }
 
@@ -7441,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;
 }
 
@@ -7469,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;
 }
 
@@ -7497,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;
 }
 
@@ -7525,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;
 }
 
@@ -7553,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;
 }
 
@@ -7581,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;
 }
 
@@ -7609,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;
 }
 
@@ -7637,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;
 }
 
@@ -7665,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;
 }
 
@@ -7693,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;
 }
 
@@ -7721,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;
 }
 
@@ -7791,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;
@@ -7799,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;
@@ -7912,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)
@@ -7985,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);
@@ -8042,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;
@@ -8087,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;
@@ -8151,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;
@@ -8169,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;
@@ -8186,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;
@@ -8204,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;
@@ -8221,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");
@@ -8400,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);
@@ -8454,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");
@@ -8513,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);
@@ -8527,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);
@@ -8538,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);
@@ -8620,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;
@@ -8676,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;
@@ -8684,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;
@@ -8791,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)
@@ -8927,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;
@@ -8942,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;
@@ -8969,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) {
@@ -8998,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;
@@ -9017,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;
@@ -9046,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 {
@@ -9075,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;
@@ -9090,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;
@@ -9101,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;
@@ -9112,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;
@@ -9123,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;
@@ -9139,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;
@@ -9150,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;
@@ -9161,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;
@@ -9172,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;
@@ -9183,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;
@@ -9194,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;
@@ -9205,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;
@@ -9216,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;
@@ -9227,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;
@@ -9238,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);
@@ -9256,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;
@@ -9267,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;
@@ -9278,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;
@@ -9289,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);
@@ -9304,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);
@@ -9606,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;
@@ -9618,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) {
@@ -9709,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);
@@ -9723,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);
@@ -9737,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);
@@ -9747,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);
@@ -9758,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);
@@ -9774,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;
@@ -9784,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);
@@ -9799,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);
@@ -9814,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);
@@ -9829,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);
@@ -9838,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);
@@ -9849,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);
@@ -9957,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;
@@ -9969,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) {
@@ -10085,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);
@@ -10096,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);
@@ -10118,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);
@@ -10168,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;
@@ -10180,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) {
@@ -10234,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);
@@ -10292,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);
@@ -10301,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)
@@ -10382,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;
@@ -10398,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;
@@ -10574,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);
@@ -10582,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)
@@ -10612,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);
@@ -10628,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);
@@ -10644,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);
@@ -10655,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;
@@ -10816,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);
@@ -10839,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;
@@ -10856,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;
@@ -10873,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;
@@ -10891,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;
@@ -11244,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);
@@ -11282,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);
@@ -11364,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);
@@ -11517,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);
@@ -11572,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);
@@ -11721,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);
@@ -11791,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);
@@ -11846,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);
@@ -11920,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);
@@ -11975,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);
@@ -12063,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);
@@ -12211,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);
@@ -12321,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);
@@ -12428,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);
@@ -12483,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);
@@ -12617,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);
@@ -12692,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);
@@ -12747,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);
@@ -12876,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);
@@ -12977,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);
@@ -13078,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);
@@ -13246,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);
@@ -13436,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;
@@ -13591,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);
@@ -13747,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);
@@ -13784,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);
@@ -13839,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);
@@ -13894,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);
@@ -13949,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);
@@ -14004,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);
@@ -14059,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);
@@ -14113,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);
@@ -14393,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);
@@ -14448,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);
@@ -14503,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);
@@ -14578,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);
@@ -14633,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);
@@ -14688,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);
@@ -14744,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);
@@ -14840,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);
@@ -14895,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);
@@ -14949,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);
@@ -15295,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);
@@ -15384,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);
@@ -15593,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);
@@ -16407,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);
@@ -16462,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);
@@ -16517,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);
@@ -16572,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);
@@ -16670,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);
@@ -16707,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);
@@ -16762,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);
@@ -16866,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);
@@ -16974,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);
@@ -17583,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);
@@ -17684,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);
@@ -17739,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);
@@ -18195,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);
@@ -18301,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);
@@ -18621,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);
@@ -18756,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);
@@ -18811,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);
@@ -18866,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);
@@ -18921,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);
@@ -18976,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);
@@ -19031,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);
@@ -19086,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);
@@ -19141,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);
@@ -19196,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);
@@ -19251,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);
@@ -19306,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);
@@ -19361,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);
@@ -19416,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);
@@ -19471,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);
@@ -19526,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);
@@ -19581,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);
@@ -19636,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);
@@ -19691,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);
@@ -19746,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);
@@ -19801,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);
@@ -19856,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);
@@ -19911,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);
@@ -19966,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);
@@ -20021,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);
@@ -20076,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);
@@ -20131,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);
@@ -20186,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);
@@ -20241,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);
@@ -20296,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);
@@ -20351,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);
@@ -20406,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);
@@ -20461,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);
@@ -20516,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);
@@ -20571,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);
@@ -20909,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);
@@ -20987,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);
@@ -21806,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;
 }
@@ -21825,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);
@@ -21898,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);
@@ -22810,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;
@@ -23086,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);
@@ -23170,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_ChannelMonitorUpdateErr_temporary_failure"))) TS_ChannelMonitorUpdateErr_temporary_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_temporary_failure());
+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_permanent_failure"))) TS_ChannelMonitorUpdateErr_permanent_failure() {
-       uint32_t ret_conv = LDKChannelMonitorUpdateErr_to_js(ChannelMonitorUpdateErr_permanent_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_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;
 }
 
@@ -23337,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);
@@ -23802,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;
 }
@@ -23826,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);
@@ -23883,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);
@@ -24869,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);
@@ -25043,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);
@@ -25135,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);
@@ -27792,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);
@@ -28204,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);
@@ -28348,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);
@@ -28443,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);
@@ -28538,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);
@@ -28622,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);
@@ -28687,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);
@@ -29126,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);
@@ -29485,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);
@@ -29628,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);
@@ -29726,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);
@@ -29853,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);
@@ -29954,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);
@@ -30038,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);
@@ -30187,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);
@@ -30328,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);
@@ -30389,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);
@@ -30506,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);
@@ -30586,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);
@@ -30685,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);
@@ -30842,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);
@@ -30966,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);
@@ -31057,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);
@@ -31155,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);
@@ -31254,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);
@@ -31397,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);
@@ -31478,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);
@@ -31696,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);
@@ -31800,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);
@@ -31999,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);
@@ -32181,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);
@@ -32435,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);
@@ -32539,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);
@@ -32649,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);
@@ -32830,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);
@@ -32954,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);
@@ -33045,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);
@@ -33155,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);
@@ -33711,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);
@@ -34599,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);
@@ -34881,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);
@@ -35436,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;
@@ -35665,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);
@@ -35900,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);
@@ -36820,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;
@@ -37460,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;
@@ -37484,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);
@@ -37510,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);
@@ -37536,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);
@@ -37562,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);
@@ -37588,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);
@@ -39041,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);
@@ -39421,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);
@@ -39737,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);
@@ -39985,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);
@@ -40561,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);
@@ -40656,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);
@@ -40841,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);
@@ -41063,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) {
@@ -43132,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);
@@ -43585,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();
@@ -43592,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);
@@ -43607,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);
@@ -43639,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);
 }
 
@@ -43671,6 +44737,37 @@ 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);
@@ -43747,11 +44844,10 @@ uint64_t  __attribute__((export_name("TS_GraphSyncError_clone"))) TS_GraphSyncEr
 }
 
 uint64_t  __attribute__((export_name("TS_GraphSyncError_decode_error"))) TS_GraphSyncError_decode_error(uint64_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);
        uint64_t ret_ref = tag_ptr(ret_copy, true);
@@ -43933,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);
@@ -43981,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);
@@ -46027,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);
@@ -46040,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);
@@ -46051,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);
@@ -46068,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);
@@ -46075,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 353bafaba7eccc04b17d63531ffe06085939e08f..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,7 +149,8 @@ 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, inputArray.length + 1);
        arrayMemoryView[0] = BigInt(inputArray.length);
@@ -156,15 +159,15 @@ export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): nu
 }
 
 /* @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.
+       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 given ChannelMonitorUpdate. If
-       you return a TemporaryFailure you must ensure that it is written to disk safely before
-       writing out the latest ChannelManager 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
-       (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\".
+       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 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.
+       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.
+       
+       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).
        
-       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.
+       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`].
        
-       This failure may also signal a failure to update the local persisted copy of one of
-       the channel monitor instance.
+       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 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 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() {}
 }
@@ -6418,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 */
@@ -6434,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!");
        }
@@ -6470,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;
@@ -6634,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 */
@@ -6695,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;
@@ -6761,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 */
@@ -6827,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;
@@ -6854,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 */
@@ -6953,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;
@@ -9517,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 */
@@ -11272,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 */
@@ -14089,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 */
@@ -16636,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 */
@@ -16708,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 */
@@ -17222,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);
@@ -17239,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 */
@@ -17302,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 */
@@ -18139,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 */
@@ -18346,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 */
@@ -18437,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);
@@ -18571,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 */
@@ -18905,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);
@@ -18922,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 */
@@ -18967,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 */
@@ -19552,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 */
@@ -19678,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 */
@@ -19750,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 */
@@ -21487,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 */
@@ -21740,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);
@@ -21766,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 */
@@ -21838,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 */
@@ -21910,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 */
@@ -21982,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 */
@@ -22054,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 */
@@ -22108,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 */
@@ -22477,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 */
@@ -22774,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 */
@@ -22882,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 */
@@ -22954,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 */
@@ -23044,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 */
@@ -23116,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 */
@@ -23188,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 */
@@ -23296,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 */
@@ -23413,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 */
@@ -23458,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 */
@@ -23548,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 */
@@ -23611,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 */
@@ -23692,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 */
@@ -23782,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 */
@@ -23872,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 */
@@ -23944,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 */
@@ -24016,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 */
@@ -24097,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 */
@@ -24205,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 */
@@ -24277,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 */
@@ -24430,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 */
@@ -24502,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 */
@@ -24655,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 */
@@ -24781,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 */
@@ -24997,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 */
@@ -25069,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 */
@@ -25159,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 */
@@ -25285,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 */
@@ -25357,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 */
@@ -25429,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 */
@@ -25519,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 */
@@ -25816,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 */
@@ -26527,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 */
@@ -26744,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!");
        }
@@ -27112,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 */
@@ -27274,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 */
@@ -27445,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 */
@@ -28075,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 */
@@ -28516,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 */
@@ -28543,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 */
@@ -28570,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 */
@@ -28597,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 */
@@ -28624,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 */
@@ -28651,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 */
@@ -30001,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 */
@@ -30307,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 */
@@ -30541,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 */
@@ -30712,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 */
@@ -31135,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 */
@@ -31207,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 */
@@ -31315,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 */
@@ -31442,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);
@@ -32818,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 */
@@ -33151,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 */
@@ -33161,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 SendError_eq(a: bigint, b: bigint): boolean {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       const nativeResponseValue = wasm.TS_SendError_eq(a, b);
+       return nativeResponseValue;
+}
+       // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
+/* @internal */
+export function CustomOnionMessageHandler_free(this_ptr: bigint): void {
+       if(!isWasmInitialized) {
+               throw new Error("initializeWasm() must be awaited first!");
+       }
+       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): bigint {
+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);
+       const nativeResponseValue = wasm.TS_OnionMessenger_new(keys_manager, logger, custom_handler);
        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);
+       // 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_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, reply_path: bigint): bigint {
+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_onion_message(this_arg, intermediate_nodes, destination, reply_path);
+       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);
@@ -33196,6 +34147,33 @@ 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 */
@@ -33466,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 */
@@ -33511,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 */
@@ -35249,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);
@@ -35387,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!");
@@ -35412,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 86b7d91123d5bb9eefb0499b7063393253b219af..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';
@@ -362,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';
index d4370cb199ebb9dce7140ec6e1993d68e8e1c2a6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -385,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);
@@ -394,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
@@ -457,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;
@@ -477,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 {
@@ -539,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 bc9ce2859602a7fd4569d79dc9ad2ec73be3b146..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -632,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);
        }
@@ -652,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 734d0946de94da4e35842f79e48df3daec0fc647..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -395,7 +399,7 @@ export interface AccessInterface {
 }
 
 class LDKAccessHolder {
-       held: Access;
+       held: Access|null = null;
 }
 
 /**
@@ -404,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;
        }
@@ -431,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 044e0469ae8627be00166623b92bc4a517496304..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -478,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 a531bb2459fc07a08fcbc041df07d2ecfe61adbb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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 f7110c47e0681f4a2588c082b40657b20d8962f2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -514,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.
         * 
@@ -540,7 +548,7 @@ export interface BaseSignInterface {
 }
 
 class LDKBaseSignHolder {
-       held: BaseSign;
+       held: BaseSign|null = null;
 }
 
 /**
@@ -564,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;
        }
@@ -663,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);
@@ -679,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!;
        }
 
        /**
@@ -883,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 8ec31cb061058c08d305983ee7c5c2ca8a3aa25f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 d7ccbd75ee06dfef25aa82ba284fbaa3d0b9497d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -405,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 98d149a97e7fb3f083136eb203623fe6336fc411..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -385,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 b00112dbccf56ec80a2432a303a5bc594aae51ce..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -392,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 8492ce940ce71ca4f7519eac06e6089afcc28059..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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 3f616ff5c18bd6932fd4225b53bba391dc81468c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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 0024f8e36ecf20ed2f1b78fabae315dace24c5c2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface BroadcasterInterfaceInterface {
 }
 
 class LDKBroadcasterInterfaceHolder {
-       held: BroadcasterInterface;
+       held: BroadcasterInterface|null = null;
 }
 
 /**
@@ -399,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;
        }
@@ -424,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 ccdd79a94f612768e2cc8caa906ccc468cabef6b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 5483cda4b42bc8fab76db6721f1cfde52306aa6a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -394,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);
        }
 
@@ -481,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 61c3aaf22f1f2286518aeced4c8897558b8e6757..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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 d18511f37913fbb3bde4c10b5d6e660f1d956840..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -498,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 92fa1677aebda75ab0b23492c9a528eb6f3b3972..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -514,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
@@ -536,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
@@ -629,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 d75768151329896e8dec203ca599c11267c252ff..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -475,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 67b81396820f4a3707440e3e6115a8222476cbe8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -455,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);
        }
@@ -481,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);
        }
@@ -981,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 8421fe1696da0d25d14981d8857f346996bd2794..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -426,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 79857e3a50c69310c3a1cdffa869949cc1169088..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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 5623b3f3257c6df505d73655164964558dc1e305..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -396,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 dc920b078ac72971284caae5a8e49c07c488836e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -444,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);
        }
@@ -484,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);
        }
@@ -529,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);
        }
@@ -549,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 ad8562d7521960f662169dd6e7f499d0fd8889a0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -421,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);
        }
 
@@ -491,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);
@@ -654,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
@@ -677,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);
@@ -741,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 cb6fd0ddee32e44b8d0efcc26dba82e1177aaa26..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -417,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 f3f0c69f1aa5d236b2217ea3124a743073cf102d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -434,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;
@@ -463,7 +474,7 @@ export interface ChannelMessageHandlerInterface {
 }
 
 class LDKChannelMessageHandlerHolder {
-       held: ChannelMessageHandler;
+       held: ChannelMessageHandler|null = null;
 }
 
 /**
@@ -474,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;
        }
@@ -573,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);
@@ -606,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!;
        }
 
        /**
@@ -743,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);
@@ -750,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 9d7981df6bcb3e70aea481df3d454e30453d62f6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -401,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);
        }
 
@@ -548,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 02bd86aa4c4d14a7020bf9fa92d9fcfb97f9590e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -392,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);
        }
 
@@ -402,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);
@@ -420,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 950aac8885548d07da2a2c5e8d9838f2fab9d4e9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -513,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 65c8282c721b5c69f8022ba402ae5ce71b3e3541..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -466,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 61d1f8e5e9c7d7ddbc3a76c53ffd7334dd17d640..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -451,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 76c307f39aebef0f71fe9df93010c592d8cf948e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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);
        }
 
@@ -463,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);
        }
@@ -485,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);
@@ -499,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 98cee3c520dd085ffcae11109323718557943477..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -395,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);
        }
 
@@ -435,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 75e115d652209a75196fe56687d92d53b00de0f5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -450,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 f86a1843934ea45f0b677c32653ec6d85de40231..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -508,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);
        }
@@ -540,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 de2a1b65221849546023f8742e8af8b0bb01043e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 5181c17ec69ba21e46471cf7e08f78a7b824f7e6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -456,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);
        }
@@ -487,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 30d4cbb841d5134139aff299d07454e6032810ad..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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);
        }
 
@@ -451,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 94982b8f202cfb3a2167597fda1cda3ac1bac2eb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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);
        }
 
@@ -417,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 e6dfa706338aec2fae2e49f1f515ce92b3189d7c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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);
@@ -497,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 111d7701eea4552554fd56ae18284345bcff95f3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -472,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 28802a3102305d3d877cb97cd5989e01333bba67..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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 d6ec8dd4a77379f10e5dd5b37cc50327d0171147..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -508,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);
        }
@@ -562,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 34b24523cfa7c979af5f6102f374c762cc6f4e90..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';
@@ -352,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';
@@ -398,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;
@@ -432,5 +436,5 @@ export class WitnessVersion {
 }
 
 export class UnqualifiedError {
-       public constructor(val: number) {}
+       public constructor(_val: number) {}
 }
index 1da543daf5637ce62023bf06e18f131e1cd1307c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -434,7 +438,7 @@ export interface ConfirmInterface {
 }
 
 class LDKConfirmHolder {
-       held: Confirm;
+       held: Confirm|null = null;
 }
 
 /**
@@ -473,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;
        }
@@ -520,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 5203a475faabe8c6ece554e7217980106c8835e7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 508c262b8c3b6da1e0650a41ff4c8102bb8d1236..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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 bdfde2e6d0d4713aa3a6f3c545cf990779ddd3d6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 29a4b9db0e5ca04a51bc814dc492db390b046ff5..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';
@@ -351,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';
@@ -398,7 +402,7 @@ export interface CustomMessageHandlerInterface {
 }
 
 class LDKCustomMessageHandlerHolder {
-       held: CustomMessageHandler;
+       held: CustomMessageHandler|null = null;
 }
 
 /**
@@ -406,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;
        }
@@ -436,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 6c7b853781ab7fba180f77f90677e291340050ff..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';
@@ -351,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';
@@ -394,7 +398,7 @@ export interface CustomMessageReaderInterface {
 }
 
 class LDKCustomMessageReaderHolder {
-       held: CustomMessageReader;
+       held: CustomMessageReader|null = null;
 }
 
 /**
@@ -403,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;
        }
@@ -430,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 85612dd51a4cb865b6efbd9c54e68e8087b0f807..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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);
        }
 
@@ -452,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 b94c12d6653bf69deea17cbb960d8acb5a0ac9a0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -380,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 {
@@ -400,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 f50d5315625da2bddaa3f120a8410651e5430571..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';
@@ -352,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';
@@ -386,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 c8baef96c0c431a5c5da751d9f121840b36d4671..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -539,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 ed0a025f2bc79d14d2c576e6c5fe95c6ef6bfe14..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 1c6402d5c6c5bb5d5897dece1d32e03b14d7183d..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';
@@ -352,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';
@@ -384,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 98d0cfdbfd7e76b0ccf9a553a0f8b14d2ec355dc..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';
@@ -352,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';
@@ -387,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 8a52f63ef727741cea35c309adad3e4ceb7914bd..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';
@@ -352,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';
@@ -390,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 0ccd519fb7471f75139bd1116be5ebe4ed5389f7..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';
@@ -352,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';
@@ -387,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 8cacf3efda18ab5e9531f3f76953e90501ab114e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 07540c8dc99e26e2cf21ad7181e9c2adafb1814d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -459,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 b9a409b6465a4a5c69f26226c203c1ed4da4bfad..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';
@@ -352,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';
@@ -387,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 29ab18145ea5c1fec3d7d5126099783ea9af806c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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 0461b621e2fd57636f0951377da6fdca9bd40693..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -393,7 +397,7 @@ export interface EventHandlerInterface {
 }
 
 class LDKEventHandlerHolder {
-       held: EventHandler;
+       held: EventHandler|null = null;
 }
 
 /**
@@ -401,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;
        }
@@ -426,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 13a6f4c8d9b561a6cee1220e141cdbce49d68fc2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -393,7 +397,7 @@ export interface EventsProviderInterface {
 }
 
 class LDKEventsProviderHolder {
-       held: EventsProvider;
+       held: EventsProvider|null = null;
 }
 
 /**
@@ -430,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;
        }
@@ -456,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 db4b8947f80b73e6ebc75231ea363f2e19263ec0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 26bab44e0c5d10d94356bc2d226dc1bf91696aa8..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';
@@ -352,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';
@@ -387,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);
        }
 
@@ -436,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 cb01d78067035ec421c5cb0eeb3461a23e85d8fb..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';
@@ -352,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';
@@ -384,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 420a92709436ed458b088bac0cc3b6a8404c8a25..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -398,7 +402,7 @@ export interface FeeEstimatorInterface {
 }
 
 class LDKFeeEstimatorHolder {
-       held: FeeEstimator;
+       held: FeeEstimator|null = null;
 }
 
 /**
@@ -410,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;
        }
@@ -435,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 8ab8b0d0abe97fccd6a5766925c4a854da50771a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -400,7 +404,7 @@ export interface FilterInterface {
 }
 
 class LDKFilterHolder {
-       held: Filter;
+       held: Filter|null = null;
 }
 
 /**
@@ -419,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;
        }
@@ -458,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 fa28d3872ad98c1b87cbb90692591061582125dd..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 b7b9dff29774cb45581c44e2475f5eeb45d5f607..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -478,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 f0a8d673414c25d4d58258c21fd1a39c4e37631d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -447,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 2364cfa1ded3880fadb6807fb6f45d6522e96c6f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 ce6f4b33b1e492b69ab13c7f1723fa52ca36f71b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface FutureCallbackInterface {
 }
 
 class LDKFutureCallbackHolder {
-       held: FutureCallback;
+       held: FutureCallback|null = null;
 }
 
 /**
@@ -406,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;
        }
@@ -430,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 aae94137e9fbd5a30609ddecb2e3ec46d33d5a19..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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);
        }
 
@@ -463,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
         */
index 2a93ee98db1e011e7f76955f59f732426d9220bd..389a77b03e1f3e1549440969039244af18df9e21 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,7 +388,7 @@ import * as bindings from '../bindings.mjs'
  * All-encompassing standard error type that processing can return
  */
 export class GraphSyncError extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.GraphSyncError_free); }
+       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);
@@ -415,10 +419,9 @@ export class GraphSyncError extends CommonBase {
         * Utility method to constructs a new DecodeError-variant GraphSyncError
         */
        public static constructor_decode_error(a: DecodeError): GraphSyncError {
-               const ret: bigint = bindings.GraphSyncError_decode_error(a == null ? 0n : CommonBase.get_ptr_of(a));
+               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);
-               CommonBase.add_ref_from(ret_hu_conv, a);
                return ret_hu_conv;
        }
 
@@ -441,7 +444,7 @@ export class GraphSyncError_DecodeError extends GraphSyncError {
        public constructor(ptr: bigint) {
                super(null, ptr);
                const decode_error: bigint = bindings.LDKGraphSyncError_DecodeError_get_decode_error(ptr);
-               const decode_error_hu_conv: DecodeError = new DecodeError(null, decode_error);
+               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;
        }
index d925bb291ab0e164f5e1463f221d5d2db1498ec5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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);
@@ -442,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 c6d60a4c158eae40e0f94985074720b1b2e7f06b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -505,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 4cf60e0ec492fa2c9595253910533d8b204a8ae6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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);
        }
 
@@ -407,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 562401ac10c85c3d6a35f82b03a6708e0ea298ea..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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 8f1f1c31e8eb117528b661c15ec6ea550a40bd62..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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);
        }
 
@@ -409,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 3d153f15ab41102844721d0ea2b3e52112a51806..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';
@@ -351,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';
@@ -387,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);
        }
 
@@ -445,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 b37584c3ca90c514efe858b9d891b3cbf7ad0700..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 f36c581b71b83a540ab382f3fd479c9e50e052d9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 10adbbf2fbebe9f27d4ae8c7b939a245fcb05ae1..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -457,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 01d7923ded937cac206eb0c7c58543d8c8058f63..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -416,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
         */
@@ -437,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 50e76f13d8d61c6881aeadb89a9caad3ea1467ac..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 4c7ca0dbe41d12cbc06f5dd5771d9cfb25afc76b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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 ae95d1aca77c19a894ca4807998c38d244cf8f2d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -426,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 ae1c2ae7286e00f043e03bd02514e6df4a729e67..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';
@@ -352,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';
@@ -390,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 78247d53db8b2c7401bc01ffa8df8a9910cea86d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 5f8883dbf7a11d33f6c75c24188ea318b1062dd4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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;
@@ -440,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.
@@ -456,7 +477,7 @@ export interface KeysInterfaceInterface {
 }
 
 class LDKKeysInterfaceHolder {
-       held: KeysInterface;
+       held: KeysInterface|null = null;
 }
 
 /**
@@ -464,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;
        }
@@ -484,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);
@@ -544,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!;
        }
 
        /**
@@ -554,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);
@@ -561,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 {
@@ -647,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 95e96dcd7769dcb22ea1103c99476769811dfbb5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -398,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 4b79a0231a53b57d00d13a81146cbccd4041c5a8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 e60a970aff1b6697ef9ed0445ca85f1304446239..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -398,7 +402,7 @@ export interface ListenInterface {
 }
 
 class LDKListenHolder {
-       held: Listen;
+       held: Listen|null = null;
 }
 
 /**
@@ -416,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;
        }
@@ -458,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 9ef07fbdb5bbe8fa86aae92391457542fa7ddd10..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface LockableScoreInterface {
 }
 
 class LDKLockableScoreHolder {
-       held: LockableScore;
+       held: LockableScore|null = null;
 }
 
 /**
@@ -406,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;
        }
@@ -433,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 85b5c00928ea4d4ac9cd4cdddbd51c09392f3721..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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 ec2bbb7af948f18d1b5104fe249fddaf76f3c8ff..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface LoggerInterface {
 }
 
 class LDKLoggerHolder {
-       held: Logger;
+       held: Logger|null = null;
 }
 
 /**
@@ -399,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;
        }
@@ -424,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 bdbbe406d854c2430e6f253008f4e999abc78c02..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';
@@ -352,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';
@@ -386,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 d66cb130043de4451767eca88cf275bb20f828eb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 abe87077b9e3b1f87044684a3997ad116c590b8d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -392,7 +396,7 @@ export interface MessageSendEventsProviderInterface {
 }
 
 class LDKMessageSendEventsProviderHolder {
-       held: MessageSendEventsProvider;
+       held: MessageSendEventsProvider|null = null;
 }
 
 /**
@@ -400,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;
        }
@@ -426,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 272f539854c83175588cb3220dea8e631940e113..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';
@@ -352,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';
@@ -386,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 27d22285a3628048c86e3bf4e907fbe0f633564b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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
@@ -436,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);
@@ -457,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
         */
@@ -491,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
         */
@@ -508,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 f206b9f0a7a2135cb15eabeb1b4af2a14b28f43a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 ba83d6d06e063d0ae9c73738a592606d14aa88cf..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';
@@ -352,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';
@@ -386,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 38fbcb487f0949c2f1e240af80938c1d536b5eee..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';
@@ -352,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';
@@ -386,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 01925d7ca261f2e8e037cab98ee026512d695172..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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);
@@ -465,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 19bbf3d5e6ddbd38dab1f1673d15396b754d54ff..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -548,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)));
        }
 
        /**
@@ -563,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 7fb2149bdc661048cfe02c9aed8722ad3d429fae..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
@@ -446,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 97551c527a9a075dc46694c8162ee108f92f7a4f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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);
        }
 
@@ -428,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 9f50b92656f26e15ca2a2aae9560586fa3f1befe..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -450,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 ae280f0c5b758b286324fb0e719b8ccbce7e6020..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -512,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);
        }
@@ -545,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 e8836ad6de4e99d8fec793effaad65d5f972fc8a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -416,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
         */
@@ -436,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 f5dadd920f6c5710eff70665bf5fd04a022e2bda..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 8cf52659a532229d45f61355db78feb6afe97f4a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -429,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);
        }
@@ -455,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);
        }
@@ -487,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 f205e2d69e7b70b604c95a83da42ffb499a6180a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -421,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 1cbed1b86575d8d15d0ba3395f1351433acec107..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';
@@ -351,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';
@@ -390,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
@@ -411,7 +422,7 @@ export interface OnionMessageHandlerInterface {
 }
 
 class LDKOnionMessageHandlerHolder {
-       held: OnionMessageHandler;
+       held: OnionMessageHandler|null = null;
 }
 
 /**
@@ -419,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;
        }
@@ -439,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);
@@ -461,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!;
        }
 
        /**
@@ -481,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 79f042c8c634052c0b20e79150752e96066c7cd8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -393,7 +397,7 @@ export interface OnionMessageProviderInterface {
 }
 
 class LDKOnionMessageProviderHolder {
-       held: OnionMessageProvider;
+       held: OnionMessageProvider|null = null;
 }
 
 /**
@@ -401,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;
        }
@@ -428,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 696c817038e61c213d328db2957e167a875e6698..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';
@@ -352,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';
@@ -384,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
  * 
@@ -393,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 {
@@ -408,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>
@@ -437,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);
        }
 
@@ -445,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 f0fd82e34e656fe8a07e7cc23187672213555b64..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -689,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);
        }
@@ -709,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 748f037f9537423cc953c1dc01d5f4fdba46a9da..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 c74a510bcd84b9ebf2cebbcbd368ac47f9a1d8b9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 f0a22ed01b96f05f1bb42db8c127964c511a81c0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 3928c618f5cea8b493fc25394de490ed4337e234..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 cdf7ce5b8fdf16cc7053d34404515075e30835a1..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 c2e2e07aa74fb6345748f9dca33d613052450391..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 fc59845fa4d65276e9ba59ebb0f3ae54279ac87f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 ee6f134739c224fcde9a488fba03dc5cbc4c4da7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 250868cf3d2b256f61582a7ff43470c3a7fcb427..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 f63f72db5c78658ede7948ce4e51d29b26620102..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,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 { PeerHandleError } from '../structs/PeerHandleError.mjs';
 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 6a1556c5ab10038ff7c89f885dc7603aa9dbb38c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 3533993d2606a6bd9665a8b5894cf241196179c6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 1326935aacff3c69be340e3c91679bdac61db655..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 92b68987dbdd5e261bfee4ac50e54c33cd565eba..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 359b98b5f6565259417dafacc1e38404a30740f8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 777201780872177ea1bbe62a6703a7fbbdc0bce8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 844df56bb4efada9fb29190068a9d9b0baa7feaf..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 4f89a2f3e707649113fd23f7eee7dc5d3cb9d8ec..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';
@@ -352,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';
@@ -393,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 50db80aca0664171156023722e4c7a33d9f0b59b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -385,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);
@@ -608,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 b3c37127040155beb3afa468b480493b754f4019..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
@@ -433,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 202a35da1fe428b66fdb6509a8490edc23b7663a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 421f7508462c1c2add111f43fd61dacf72fb983d..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';
@@ -352,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';
@@ -408,7 +412,7 @@ export interface PayerInterface {
 }
 
 class LDKPayerHolder {
-       held: Payer;
+       held: Payer|null = null;
 }
 
 /**
@@ -416,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;
        }
@@ -473,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!;
        }
 
        /**
@@ -507,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 adfe6c098871a99aef80fe9d34e3baf179bfe6bd..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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 42d1a5c40c067c2a1da49b4f1e1bd0f82b334571..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -433,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 4c1cedbcdc819c60d95c6315ad141f9fdccac0a3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -385,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 70513b1c55c157c3964ba2c97abb4ff942268f46..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 6d1200f94cf4aba685cf656b7873d70db688a76a..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,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 { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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 ae439b0550decf479f9ec5eb494594a2f87368e4..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';
@@ -352,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';
@@ -404,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);
        }
 
@@ -418,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 11c1a379e3567bde1a71d3777b7a9d98b439bbd2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -393,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.
         * 
@@ -428,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;
 }
 
 /**
@@ -451,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;
        }
@@ -483,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);
@@ -510,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!;
        }
 
        /**
@@ -522,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;
        }
 
        /**
@@ -566,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 64d5bc50e9c76fd6938ac80a766d04e184aa374f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -397,7 +401,7 @@ export interface PersisterInterface {
 }
 
 class LDKPersisterHolder {
-       held: Persister;
+       held: Persister|null = null;
 }
 
 /**
@@ -405,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;
        }
@@ -445,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 a97a816bc6f940ad8c723dd4a370149927349753..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -400,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 15874509c15df107f10d83ac13c45438df521102..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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 1cb8cda769e897a1dae1d36119c2c589c85ecd01..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -447,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 98a3c51a3ead822be05b1bcb045a346d84031f31..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -432,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 86a318e2ec2f23587798b0fa0670c1432e2a6b5f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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);
        }
 
@@ -444,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 d310af8f0b12e5154ab62d9d7bdfc6a95fc8053b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 384d9063434cd52c42ee8b64db8529916ca33319..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -384,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
  * 
@@ -404,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 a5f29bde93c73d93d8a1dc21bf57338c14c88760..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';
@@ -352,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';
@@ -392,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);
        }
 
@@ -454,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
@@ -463,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
         */
@@ -474,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
@@ -483,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
         */
@@ -492,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
         * 
@@ -512,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
         * 
@@ -532,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
@@ -547,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);
@@ -556,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
@@ -571,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 e3357e12f1d03ad198fa94905ba9bb48aba50589..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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);
        }
 
@@ -464,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 7b490b9625bc502c26dc205416eb297cea7e7a68..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -393,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);
        }
 
@@ -456,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
         */
index fc84b1f0fb2a405f8f4d553603c4c4dfb1817050..fb973f219580a9082639cf43b815069295ba61f5 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_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';
@@ -352,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';
@@ -390,7 +394,7 @@ import * as bindings from '../bindings.mjs'
  */
 export class RapidGossipSync extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.RapidGossipSync_free);
        }
 
index 50ed3c85f4d61a46c3678071e73d069b150f8df0..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';
@@ -352,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';
@@ -386,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 ee1b57465550896ac6b739c52f65731aba986adf..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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 9adc6f18649a4db77c31609aeb20749813e4166e..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';
@@ -352,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';
@@ -387,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 830195a669e42b6d9269ff40dd34e053c14d5cfa..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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 590d11af58f29a6a99bea5ece3936547a5b4792f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -392,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);
        }
 
@@ -500,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 57fe6036e8c297c6569efbbd97d294e314fd12b8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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);
        }
 
@@ -451,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 fed7187ad019aa1f72cab1379c3a064da9d013e0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 8460bee0cb735b8291b8da6291e98b8b41e53012..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b774083633a6ddd042387f15340dcf34eedc5e88..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -416,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;
        }
 
@@ -435,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);
@@ -447,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 be56f4b6a693c21f86c5e003a7d0634b883ef505..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -416,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;
        }
 
@@ -435,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);
@@ -447,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 e1bd47f0a5adf50024e33fe09c2faabbd6e50c4c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -434,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);
@@ -445,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 4c97a402dc5730785aada9347ce6dc4a259c8c42..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 7826a5fca44cd9a10338dd40738886ee868c23c6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -426,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);
@@ -438,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 85937fc6377f3ac14b37f9429d04ed838d7944f0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 73ec32a06cd7d727c954eb296866c5d280d0b301..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -452,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 9c0786c094ab636b62b6217b8d22fd0dcf43710f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -452,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 9c7272685ee056ebe3cff230a4a7121da8a5cf7c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 3fba7de2a036a059022ee62eef24d35af30323ac..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 bc0452b309c03201d7b3536f822df9105215f925..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 0d2329b48658945492207279699e0634019fe6b0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 9ee00f93cf46789db7c4958f6e90fc062ce926d4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 6ee1aff2dfc455064d30728399381036502dadbd..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 71a1b2232d9e6f214f4909913dee362d9a89d97f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 212419118090b4f6b92c11e6e7e347d06ceffc1e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 34ab473eb17594dddae803bee2c5e867fe693918..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 079e057e499252f8e1068f8e4ab718fbb8c510d9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -457,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 5eccf7ef8820a94567ef405af45dff3dc8365fd6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -457,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 d0b24337b3503d7bee668930e5ca92646198495f..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,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_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -452,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 e8119281ea9a0ae3ccbaa59a3eb8b0cf6bd62f03..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 acfdcca1675c3e246d24f5e004d9ca75fa10ab2b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 fb1300f38573f84050ea335d6ec70e7157485c50..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 84b3382f4e2eb5f38ee34efe09fd16a422b806b6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 beaec27816c16b053b1a7dcfc96de9ff9f12601a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b49e12131ff8e090caa41fe01f5a0b2af139465c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 3cbd335b02186eae104018af1318c5ded1f94c85..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 36ebd549ac97358eb829c4917279aaa7f298fb3a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 90b7b22ef76e13e7a9dbf7898a4ecc8c129953ee..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 61998d40e5605df4b1d8dc1f7a99c8a51a1c9853..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 6e123945fd6381fe5e7c71e3f214e8e8eb2774c4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 2ce706afa3cf95ca8d0404c007527def66089201..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 8f20430ae7e5982b4ca5d897bace7bc7dd84aaee..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 8e7c00fb04ae35814ac8b0d78bba4ad604912c87..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 eac72211140b8b66cdce8760a3a120172c8baeb5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 5ceeaff85e5d192c36d4c076c0ef8984bc586947..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 d1ce50c1dbc7816449e7dc8626b27a876a7aa1eb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 d2dcdc07ccffa22ce5276b24271982baad27e092..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 bb61a45c0756c5f09417524bc52a5cff28ff4923..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b44725102e94b87bc859b2d3acf9510f0a458d7f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 955d2311f274eeb7dc218f61fcfe0eeb174888c2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 6094f3b030220505660f49ec6fe72bb0345e8ad1..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 ea49d6111436d4a064cb6695aa833fea0a3ea8fe..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 d8397bd09937e1004068c7f474ede1d1aa94ade7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 680e52d81ec4e5b901007e0004ae83aacf87f2b3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 cddf2c46581d77ec33bd8c882aed1d12263c14ee..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 884bc6a4b0d3880832a2a3aa0339ce4679cbcd73..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b2d697e4ca6ec8efea8e785940093e658270ef33..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 9c9b4612ebbb1c0a98214d6cd7dca6cd0b31f4bf..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 59ebd202a2beaf467d34363e6958ea81bc415cfb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 36c9361d27e6005e1c19afff6b3f7c277f2d199c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 38d42dcecbdfcb4b44a0e2668e374ec7f045efc5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -416,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;
        }
 
@@ -435,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);
@@ -447,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 a5dc2c9173d4b073d1e218c42b4ee46ad9d997c5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 86e063d3e5b92d20c005a6ced96f0f1edcb04093..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 964a35b62164255187d110d6618446bf0b9377b9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 5e06928c3a47ef66d9e91a79a19d13fc0468614f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 e7f9345b217c4a7c85ced4287131d02c63e23cb5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 af76e2f180984c89cf04ec49434bb6f5dfeb541f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 ab5f0500db3add9ad6c8d01fdbc448885176f50b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 bc53297c10f6c3b0531752e01f65a1272fbc4e5c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -434,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);
@@ -445,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 71dc5d52f63bd8bdc3fbd71114fb1e15ca88ab0d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 96a7edda0db196d87f31f6d1b6b3c74e4abafaf3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -409,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;
        }
 
@@ -428,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);
@@ -440,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 442005a534421de8757ffd56153470c15b0d9fa9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 a7f18ce7a5703eb57f8835cfce7d4ce1dea02275..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 dd45b4cf556a84a8aef3b47b654371bcac4833f4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 0d9a32e711919ee964379515fa585079c3fc35d8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 ad2da9a413738437c08e5d37e668012d76cd5421..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 d05b83d1f4536de356265a086f2bbfd28d49dc4c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 968d1da9453de9a991003058afed960503079f33..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -439,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);
        }
 }
@@ -447,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 b8e1338..0000000
+++ /dev/null
@@ -1,454 +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 { GraphSyncError } from '../structs/GraphSyncError.mjs';
-import { Result_u32GraphSyncErrorZ } from '../structs/Result_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'
-
-
-
-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 f5ccadd1175be5a7d3fdd45450ab4be32ba601a4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -439,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);
        }
 }
@@ -447,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 8b1f8d32d9e65732796c56df80c752b0edd63fb7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
        }
 }
@@ -448,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 68a8605ff60415725441d7be105e2d408d7b649c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -439,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 c74b775fb651499133492483abaf4ff614ae657a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -439,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);
        }
 }
@@ -447,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 e9b826092954ae9936353b503e7c7dc38e88896c..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,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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
        }
 }
@@ -448,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 9a334ca66166a5204d0be4c071a2ac4935173dc8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -439,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);
        }
 }
@@ -447,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 a3c15f9c7f761b8b4992ea4be7ec8bd50fcdd2e1..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,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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -424,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);
        }
 }
@@ -432,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 7074db352ff6a8d1ae0c53ea3bee098c719e00c2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 13f45efb0a03ddcc2425c78060c09e9df5c02e12..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 6a2b72ab68f000612f7771f2bfe2c58245bd639a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 801a719dd392d547867023f84516fdfac70b2e74..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 9989b677f79c0c47d0b75206f1371d58add19699..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 606b52843af0a8aaac59c4a9512984e9c149cf4c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 95bd520e215287b66ef6df5b632b73ad88120123..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 fb730f8377dac2fde21bbc66a6431afe8e70ab74..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 1ccd71292c7b4a18d6d3c6f58cf91283936d22c6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 80cb99c85671062e876354ecb4a0751bf1a0e01f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 36e71e2353d9a9021f154fe92bd63e92f43ff2d5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 597a37479e85e6e1737c11b2c3bd5daf37be8ad4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 7a596edcc3b39c5fc7b74ae8529cc5c43c80a967..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b33bef1742797da33545b3136e0ba5b8eb297164..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 202ec86163163d2b5e6d72977d73344a1846b11b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 4e78b8d515b3067c5c566ffbf8b7e53128d99aec..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 34e6bde1ced47d93a81eaeec51b026e903c6dc4f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -410,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;
        }
 
@@ -429,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);
@@ -441,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 a3a1555aa1eecf7bb734849ef65a1d7dfc80d44c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 4e223fa628fe4caf38d3974621954571bff7863c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 51746b019aa36176f1f74d498050fee24e96c9f8..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 5fdcc5e8d9b3a2ab93ed98aa00303c5428273e86..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 25bfd17a94908a5aac6f9cd63cf6c652d9091108..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 cee6fe984058df5ba4feb8d4550ff86f4a40bd6e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 3f105bca6e19d7304f09f1f09d307a2576a3401b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 968a1de8380ef864abf0e5ad1214972aeead3170..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 7c33b4f568555715ae78eeea18abb30e2cca288c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 1b0142e60d639505bbebea52f8b4c91be9d54fd9..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 392ea043ff699b3ab51ffaa6651efc6d7269f97d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b133cdf2ae2b650d3fbaa29e68b8578043de05d7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -442,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);
@@ -454,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 6bddacc7f3e39e947083a80d582c2465cee7a719..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 0d994ad60ef412b42ebea2c0ef3b6cbb62497718..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 a300d59377da69c76cbe0b6cdd8b23da640b2204..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 8e3f791f7a7385516f531892cf81a9dba918ca75..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 740a020b35ee38ae6c85b8ff66c2a337f9873e6b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 ee67295fafde48005781bb41b50b22eef3d9550c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 0b9be2d276e62dd613cde029636b1c3f6e3628ba..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 cd07cd03ac29314558658a3a7fec82e753888e5f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -442,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);
@@ -454,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 dfe955256fa10cc03eb7244e0730bbcb100ac6fc..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
        }
@@ -449,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 2d4f408e780aa66cff56e5ba941056ae8101806a..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 b66ac2846d1f245dd9b5d6772ec2e3fba91d45dc..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 4272820d1c43302a034fee2f21d74e456c1b41f7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 8d1460ec1629936a193e9421b4368302060a1bd6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -407,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;
        }
 
@@ -441,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);
@@ -453,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 0cc41d2cd5fe7050095866e96f31dc5b7654a233..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 0f7c48d86bd9db84fc4f80fa762ed823d62a53cc..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 93f0c6ec527866e5367fc3f7dc9cb837762563f3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -450,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 f91288ddcb41967cb716378032e9a592bfa22644..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -434,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);
@@ -445,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 b5b2393ff58ad5d805004cfe58d474a6cf4314ca..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -434,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);
@@ -445,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 20e5b9e2a84a470ba4c39b54452893ea3286c0ff..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 22c901eb913fed6c12722040f4889eaefd230002..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
@@ -453,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 bd9cc069d59e39c66a5210b6c23b3d15a6177ef0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 16eb3931e087eed0318b2cb2e18adea76e440544..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 613c4b34c86c6be24029940ac309af4c981aa0cc..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 a1545fa0df09da697032329c382bc9174d42432b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 412b8d71f3dd810dc09d57b8007374b3338e35af..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 0c9f7aa2aaae4af800bf5297c02a2ed7dadd30f4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 c2f32c67bd79bc554dd6787cdabb6a76925d4aca..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 f03e375106bd1c7c58f55ad674cd297c7b534b05..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 3809b41525a9a2fc6aae6f25b70b17d1e447e003..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 7e1c5cfb33d005f2591279c8bc80cab334c2c8d4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -408,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;
        }
 
@@ -442,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);
@@ -454,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 9d7d7a22ed2be3e34ecb945287230f386de97656..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -440,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);
@@ -451,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 e1705f26a1e8baca73c8d2ce382d100612d56209..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
        }
@@ -450,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 b376252c712a5e55fe0d7d6df117d28c57f0755a..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,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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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 */
@@ -441,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);
        }
@@ -450,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);
index 9dcc19c5c0eb8cffaebbe91aca1c0d5451a2afc3..4d1e6dcd59f94f27e17e19dd1f79376afc18ec12 100644 (file)
@@ -2,7 +2,7 @@ import { TxOut } from '../structs/TxOut.mjs';
 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
 import { AccessError } from '../enums/AccessError.mjs';
 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
-import { ChannelMonitorUpdateErr } from '../enums/ChannelMonitorUpdateErr.mjs';
+import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
 import { CreationError } from '../enums/CreationError.mjs';
 import { Currency } from '../enums/Currency.mjs';
@@ -109,7 +109,6 @@ import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
 import { Result_TxOutAccessErrorZ } from '../structs/Result_TxOutAccessErrorZ.mjs';
 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
-import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,7 +387,7 @@ import * as bindings from '../bindings.mjs'
 
 
 export class Result_u32GraphSyncErrorZ extends CommonBase {
-       protected constructor(_dummy: object, ptr: bigint) {
+       protected constructor(_dummy: null, ptr: bigint) {
                super(ptr, bindings.CResult_u32GraphSyncErrorZ_free);
        }
        /* @internal */
@@ -425,7 +429,7 @@ export class Result_u32GraphSyncErrorZ_OK extends Result_u32GraphSyncErrorZ {
        public res: number;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       public constructor(_dummy: null, ptr: bigint) {
                super(_dummy, ptr);
                this.res = bindings.CResult_u32GraphSyncErrorZ_get_ok(ptr);
        }
@@ -434,7 +438,7 @@ export class Result_u32GraphSyncErrorZ_Err extends Result_u32GraphSyncErrorZ {
        public err: GraphSyncError;
 
        /* @internal */
-       public constructor(_dummy: object, ptr: bigint) {
+       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);
index 3eb9d22122c79f0a126850f70f5755ff65c4d562..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';
@@ -352,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';
@@ -384,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 c33dbe0a01cf5d00617e1092b4a54cd7a7b5582d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -463,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 cc94a5bb2ad7e65f58a5fb735c047292e434a7e0..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -456,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 9de76fe08c46bb2bd554e3f1616cd0653206250f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 d99acb2777ec0f69515bb83166f7d7c94042d366..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 8cd8d544e4c6fa6c2d907dc6ca063592cc65aa01..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 9246ebef7e7f685cc8528b6410aae4268aa94c2d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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 31980a83938cb093567b40e6b67e78adf170c83c..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';
@@ -352,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';
@@ -405,7 +409,7 @@ export interface RouterInterface {
 }
 
 class LDKRouterHolder {
-       held: Router;
+       held: Router|null = null;
 }
 
 /**
@@ -413,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;
        }
@@ -434,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);
@@ -501,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!;
        }
 
        /**
@@ -509,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 872f328bf71a63ee9274d40f3b757a4c6fba1bfb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 9caf24d4d975fcfb049764b4a268e09233446ea7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -414,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.
@@ -450,7 +458,7 @@ export interface RoutingMessageHandlerInterface {
 }
 
 class LDKRoutingMessageHandlerHolder {
-       held: RoutingMessageHandler;
+       held: RoutingMessageHandler|null = null;
 }
 
 /**
@@ -464,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;
        }
@@ -508,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);
@@ -558,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!;
        }
 
        /**
@@ -621,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);
@@ -632,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 debefcd3040715c23f4ab4e4a83bf5df6483ba66..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -413,7 +417,7 @@ export interface ScoreInterface {
 }
 
 class LDKScoreHolder {
-       held: Score;
+       held: Score|null = null;
 }
 
 /**
@@ -423,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;
        }
@@ -505,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 36ae2482d3c531a5ef61f02df12f05e150f59eec..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,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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -383,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);
@@ -395,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
                }
@@ -456,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
         */
@@ -466,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 {
@@ -497,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 4039180ebaed53891341e33c477d7b62cc22b044..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';
@@ -352,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';
@@ -386,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 441dec6b13fd84b37f7322376226d5b662bbe9ce..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -449,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 9b3995264c4d4c6e3d1451943a2b1b12b3628ddb..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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);
        }
 
@@ -407,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 a1b7f56e2516c61fe657f3008242540e3f4c8273..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface SignInterface {
 }
 
 class LDKSignHolder {
-       held: Sign;
+       held: Sign|null = null;
 }
 
 /**
@@ -403,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;
        }
@@ -425,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 c9ec8f59ccc432fb656aa44037f76879d2e449ff..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -385,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 e1c6c443fb86c7ff6f0e2df7e7d6382a19a6b24c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -390,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 1a659312edcd9982cef0fad59eee4ad0d8918c42..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';
@@ -352,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';
@@ -420,7 +424,7 @@ export interface SocketDescriptorInterface {
 }
 
 class LDKSocketDescriptorHolder {
-       held: SocketDescriptor;
+       held: SocketDescriptor|null = null;
 }
 
 /**
@@ -439,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;
        }
@@ -478,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 2631b5e86dfbf80ab6ce9b5942229d495af7cf01..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -388,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);
@@ -449,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 d6bc99b2631334f3dfa7b0583ebae23f97e78af2..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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);
        }
 
@@ -488,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 cb0df4a4c3d1d193e31d4f144b3728348f4bcc7d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 cab6bc2506a4e6419799fbda007845d5045f06e3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 0674cd9f9f5163769340d32a4bded76e473e7421..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 0890727a36ff6481b7b0639fd236544dc65a6e50..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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 bc30e647a88ad8889b31fa2afe4d9d3a3ad28445..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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 cee644270145b8c1d51abff5a3d5aa79f28f4e72..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 f87e48603e94dc7ca88a4b01ce3ab51399d9eb1d..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 9759be2cf0606e60061f79d3ad1ca40611622a2e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 fa98b941863545722f8e39a247f5d9f0a2ca2e43..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 b8dc44b6859e8557cca833f7ef96eb7da5600b5c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 d029f1f0e3f27279d867084bf741ef5608fd5479..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 d5222f57ba9e79cd84f9538fbe724336f9c40a9b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 6a0309517ca030bf8e8dd4769de3fda868462891..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 5d1397b9a6b4c9141ff2f27360b4f6a7c67b7a9e..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 7c63cc7b87272ca8592c9f7eb13272c8b3d932a5..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 6383319f3340fec1119ccee66bdbfe8b2c176590..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 bef54245f0663c732da76a091d52d3d056f08990..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 0f18fc47cc967ebf4715c40b5fbabf51de484444..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 e6cd2a911801e1387cb6ac6c2a5edf6ee1a33f1f..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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 ee0ddf4131a5e601b220dbb10c891957ee497d63..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -396,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);
        }
 
@@ -494,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 c56da9cd6cf8d4383f68019c7530889942fb498c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -387,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 84ccecd8f0ef4c95a404e0e3f0db831cc45b4d34..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -397,7 +401,7 @@ export interface TypeInterface {
 }
 
 class LDKTypeHolder {
-       held: Type;
+       held: Type|null = null;
 }
 
 /**
@@ -407,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;
        }
@@ -442,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 204970154a2b7647e237b92860fe6463917464b4..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -518,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 6baed7eb48a4faca1bbb7af4348a7ad254169c08..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -587,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 bd4ffd4b06e8090d8524aebdd1588fdc564deab6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -516,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 e2b1e05813b703c276636d2b8bda2b1bbdc9e2c7..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -482,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 6af32f772318675c9a42da3fa7ededae7bcbf3c3..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -436,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 cc68dacbd8202efa4e2e24bc79d0ea8a1f375152..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -451,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 c5390aec286710963d7a6c7d82e94543cc9d618b..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -446,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 d173cc479ed58ef5d58a7061daea2278eb06fc2c..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -462,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 8ab943f2eb435f935d75adf9591630e0132c7227..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -389,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 a4752ad9a20ec53b87103941046d38e01498b694..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';
@@ -352,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';
@@ -483,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
         */
@@ -748,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;
@@ -779,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;
        }
@@ -793,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 7371a8b3db114a2d7b3f230913d37fcb35ec5293..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -386,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);
        }
 
@@ -457,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 bf3a1149046523fbe28b48ff359342e9d9dc1334..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,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.
         * 
@@ -415,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;
 }
 
 /**
@@ -440,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;
        }
@@ -462,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();
@@ -491,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!;
        }
 
        /**
@@ -501,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;
        }
 
        /**
@@ -541,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 5fb16868cb3db08a78fb8d8de4697839cca699dd..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -396,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);
        }
 
@@ -416,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)));
        }
 
@@ -480,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 6e4b898b4865b0793cc9fed304dfee78fde6dec6..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';
@@ -351,6 +354,7 @@ import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/On
 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
+import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
 import { MessageHandler } from '../structs/MessageHandler.mjs';
 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
@@ -391,7 +395,7 @@ export interface WriteableScoreInterface {
 }
 
 class LDKWriteableScoreHolder {
-       held: WriteableScore;
+       held: WriteableScore|null = null;
 }
 
 /**
@@ -402,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;
        }
@@ -424,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!;
        }
 
        /**