[TS] Update auto-generated bindings to LDK 0.0.118
[ldk-java] / ts / structs / Event.mts
1 import { TxOut } from '../structs/TxOut.mjs';
2 import { TxIn } from '../structs/TxIn.mjs';
3 import { BigEndianScalar } from '../structs/BigEndianScalar.mjs';
4 import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs';
5 import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs';
6 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
7 import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
8 import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs';
9 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
10 import { CreationError } from '../enums/CreationError.mjs';
11 import { Currency } from '../enums/Currency.mjs';
12 import { HTLCClaim } from '../enums/HTLCClaim.mjs';
13 import { IOError } from '../enums/IOError.mjs';
14 import { Level } from '../enums/Level.mjs';
15 import { Network } from '../enums/Network.mjs';
16 import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs';
17 import { Recipient } from '../enums/Recipient.mjs';
18 import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs';
19 import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
20 import { SiPrefix } from '../enums/SiPrefix.mjs';
21 import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs';
22 import { UtxoLookupError } from '../enums/UtxoLookupError.mjs';
23 import { Bech32Error } from '../structs/Bech32Error.mjs';
24 import { Option_u64Z } from '../structs/Option_u64Z.mjs';
25 import { BlindedPath } from '../structs/BlindedPath.mjs';
26 import { Refund } from '../structs/Refund.mjs';
27 import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs';
28 import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs';
29 import { Retry } from '../structs/Retry.mjs';
30 import { DecodeError } from '../structs/DecodeError.mjs';
31 import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs';
32 import { ShutdownScript } from '../structs/ShutdownScript.mjs';
33 import { APIError } from '../structs/APIError.mjs';
34 import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
35 import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs';
36 import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs';
37 import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs';
38 import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs';
39 import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs';
40 import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs';
41 import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs';
42 import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs';
43 import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs';
44 import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs';
45 import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
46 import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
47 import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
48 import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
49 import { OutPoint } from '../structs/OutPoint.mjs';
50 import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
51 import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
52 import { Option_u32Z } from '../structs/Option_u32Z.mjs';
53 import { TwoTuple_CVec_u8ZusizeZ } from '../structs/TwoTuple_CVec_u8ZusizeZ.mjs';
54 import { Result_C2Tuple_CVec_u8ZusizeZNoneZ } from '../structs/Result_C2Tuple_CVec_u8ZusizeZNoneZ.mjs';
55 import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs';
56 import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs';
57 import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs';
58 import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs';
59 import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
60 import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs';
61 import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs';
62 import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs';
63 import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
64 import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs';
65 import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
66 import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs';
67 import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
68 import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
69 import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
70 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
71 import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
72 import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
73 import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
74 import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs';
75 import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs';
76 import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs';
77 import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs';
78 import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs';
79 import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs';
80 import { Option_u16Z } from '../structs/Option_u16Z.mjs';
81 import { Option_boolZ } from '../structs/Option_boolZ.mjs';
82 import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
83 import { InMemorySigner } from '../structs/InMemorySigner.mjs';
84 import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
85 import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
86 import { ChannelDetails } from '../structs/ChannelDetails.mjs';
87 import { Route } from '../structs/Route.mjs';
88 import { LightningError } from '../structs/LightningError.mjs';
89 import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
90 import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
91 import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
92 import { RouteHop } from '../structs/RouteHop.mjs';
93 import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
94 import { BlindedHop } from '../structs/BlindedHop.mjs';
95 import { BlindedTail } from '../structs/BlindedTail.mjs';
96 import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs';
97 import { Path } from '../structs/Path.mjs';
98 import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
99 import { RouteParameters } from '../structs/RouteParameters.mjs';
100 import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
101 import { PaymentParameters } from '../structs/PaymentParameters.mjs';
102 import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
103 import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs';
104 import { RouteHint } from '../structs/RouteHint.mjs';
105 import { RouteHintHop } from '../structs/RouteHintHop.mjs';
106 import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
107 import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
108 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
109 import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
110 import { NodeId } from '../structs/NodeId.mjs';
111 import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
112 import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
113 import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs';
114 import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs';
115 import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs';
116 import { Option_f64Z } from '../structs/Option_f64Z.mjs';
117 import { Record } from '../structs/Record.mjs';
118 import { Logger, LoggerInterface } from '../structs/Logger.mjs';
119 import { NetworkGraph } from '../structs/NetworkGraph.mjs';
120 import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
121 import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
122 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
123 import { TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ } from '../structs/TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ.mjs';
124 import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs';
125 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
126 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
127 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
128 import { InitFeatures } from '../structs/InitFeatures.mjs';
129 import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
130 import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
131 import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
132 import { NodeFeatures } from '../structs/NodeFeatures.mjs';
133 import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
134 import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs';
135 import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs';
136 import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs';
137 import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs';
138 import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs';
139 import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs';
140 import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
141 import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
142 import { Offer } from '../structs/Offer.mjs';
143 import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs';
144 import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs';
145 import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
146 import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
147 import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
148 import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
149 import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
150 import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs';
151 import { UtxoFuture } from '../structs/UtxoFuture.mjs';
152 import { UtxoResult } from '../structs/UtxoResult.mjs';
153 import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs';
154 import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs';
155 import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
156 import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
157 import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
158 import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
159 import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
160 import { AcceptChannel } from '../structs/AcceptChannel.mjs';
161 import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs';
162 import { OpenChannel } from '../structs/OpenChannel.mjs';
163 import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs';
164 import { FundingCreated } from '../structs/FundingCreated.mjs';
165 import { FundingSigned } from '../structs/FundingSigned.mjs';
166 import { TxAddInput } from '../structs/TxAddInput.mjs';
167 import { TxAddOutput } from '../structs/TxAddOutput.mjs';
168 import { TxRemoveInput } from '../structs/TxRemoveInput.mjs';
169 import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs';
170 import { TxComplete } from '../structs/TxComplete.mjs';
171 import { TxSignatures } from '../structs/TxSignatures.mjs';
172 import { TxInitRbf } from '../structs/TxInitRbf.mjs';
173 import { TxAckRbf } from '../structs/TxAckRbf.mjs';
174 import { TxAbort } from '../structs/TxAbort.mjs';
175 import { ChannelReady } from '../structs/ChannelReady.mjs';
176 import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
177 import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
178 import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
179 import { ClosingSigned } from '../structs/ClosingSigned.mjs';
180 import { Shutdown } from '../structs/Shutdown.mjs';
181 import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
182 import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
183 import { ErrorMessage } from '../structs/ErrorMessage.mjs';
184 import { WarningMessage } from '../structs/WarningMessage.mjs';
185 import { ErrorAction } from '../structs/ErrorAction.mjs';
186 import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
187 import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
188 import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
189 import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
190 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
191 import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
192 import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
193 import { ChannelInfo } from '../structs/ChannelInfo.mjs';
194 import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
195 import { RoutingFees } from '../structs/RoutingFees.mjs';
196 import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
197 import { Hostname } from '../structs/Hostname.mjs';
198 import { SocketAddress } from '../structs/SocketAddress.mjs';
199 import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
200 import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
201 import { NodeAlias } from '../structs/NodeAlias.mjs';
202 import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
203 import { NodeInfo } from '../structs/NodeInfo.mjs';
204 import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
205 import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
206 import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs';
207 import { Utxo } from '../structs/Utxo.mjs';
208 import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs';
209 import { Input } from '../structs/Input.mjs';
210 import { CoinSelection } from '../structs/CoinSelection.mjs';
211 import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs';
212 import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs';
213 import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs';
214 import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs';
215 import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs';
216 import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs';
217 import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs';
218 import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
219 import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
220 import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs';
221 import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs';
222 import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs';
223 import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs';
224 import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs';
225 import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs';
226 import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs';
227 import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs';
228 import { Option_StrZ } from '../structs/Option_StrZ.mjs';
229 import { Result_NoneBolt12SemanticErrorZ } from '../structs/Result_NoneBolt12SemanticErrorZ.mjs';
230 import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs';
231 import { InvoiceRequest } from '../structs/InvoiceRequest.mjs';
232 import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs';
233 import { InvoiceError } from '../structs/InvoiceError.mjs';
234 import { OffersMessage } from '../structs/OffersMessage.mjs';
235 import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs';
236 import { Destination } from '../structs/Destination.mjs';
237 import { ThreeTuple_OffersMessageDestinationBlindedPathZ } from '../structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.mjs';
238 import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
239 import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
240 import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
241 import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
242 import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
243 import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
244 import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
245 import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs';
246 import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
247 import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
248 import { Watch, WatchInterface } from '../structs/Watch.mjs';
249 import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
250 import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs';
251 import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs';
252 import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs';
253 import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
254 import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
255 import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs';
256 import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs';
257 import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs';
258 import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
259 import { Router, RouterInterface } from '../structs/Router.mjs';
260 import { ChannelManager } from '../structs/ChannelManager.mjs';
261 import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs';
262 import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs';
263 import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs';
264 import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs';
265 import { ChannelConfig } from '../structs/ChannelConfig.mjs';
266 import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
267 import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs';
268 import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs';
269 import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs';
270 import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
271 import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
272 import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
273 import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
274 import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs';
275 import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs';
276 import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs';
277 import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
278 import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs';
279 import { Balance } from '../structs/Balance.mjs';
280 import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs';
281 import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs';
282 import { Type, TypeInterface } from '../structs/Type.mjs';
283 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
284 import { OnionMessageContents, OnionMessageContentsInterface } from '../structs/OnionMessageContents.mjs';
285 import { Option_OnionMessageContentsZ } from '../structs/Option_OnionMessageContentsZ.mjs';
286 import { Result_COption_OnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_OnionMessageContentsZDecodeErrorZ.mjs';
287 import { ThreeTuple_OnionMessageContentsDestinationBlindedPathZ } from '../structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.mjs';
288 import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
289 import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
290 import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs';
291 import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs';
292 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
293 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
294 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
295 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
296 import { GraphSyncError } from '../structs/GraphSyncError.mjs';
297 import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
298 import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs';
299 import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs';
300 import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs';
301 import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs';
302 import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs';
303 import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs';
304 import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs';
305 import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs';
306 import { Option_i64Z } from '../structs/Option_i64Z.mjs';
307 import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs';
308 import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs';
309 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
310 import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
311 import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
312 import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
313 import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
314 import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs';
315 import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs';
316 import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs';
317 import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs';
318 import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs';
319 import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs';
320 import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs';
321 import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs';
322 import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs';
323 import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs';
324 import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
325 import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
326 import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
327 import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
328 import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
329 import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
330 import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
331 import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
332 import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
333 import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
334 import { Init } from '../structs/Init.mjs';
335 import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
336 import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
337 import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs';
338 import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
339 import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
340 import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
341 import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
342 import { UpdateFee } from '../structs/UpdateFee.mjs';
343 import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
344 import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
345 import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
346 import { OnionMessage } from '../structs/OnionMessage.mjs';
347 import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
348 import { Ping } from '../structs/Ping.mjs';
349 import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
350 import { Pong } from '../structs/Pong.mjs';
351 import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
352 import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
353 import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
354 import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
355 import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
356 import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
357 import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
358 import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
359 import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
360 import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
361 import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
362 import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
363 import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
364 import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
365 import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
366 import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs';
367 import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
368 import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs';
369 import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs';
370 import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs';
371 import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
372 import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
373 import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
374 import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
375 import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
376 import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
377 import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
378 import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
379 import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
380 import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
381 import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
382 import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
383 import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
384 import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
385 import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
386 import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
387 import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
388 import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs';
389 import { Option_usizeZ } from '../structs/Option_usizeZ.mjs';
390 import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
391 import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
392 import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
393 import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
394 import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
395 import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs';
396 import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs';
397 import { PathFailure } from '../structs/PathFailure.mjs';
398 import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs';
399 import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs';
400 import { UntrustedString } from '../structs/UntrustedString.mjs';
401 import { ClosureReason } from '../structs/ClosureReason.mjs';
402 import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
403 import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
404 import { HTLCDestination } from '../structs/HTLCDestination.mjs';
405 import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
406 import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
407 import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs';
408 import { Option_U128Z } from '../structs/Option_U128Z.mjs';
409 import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs';
410 import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs';
411 import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs';
412 import { Option_EventZ } from '../structs/Option_EventZ.mjs';
413 import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
414 import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs';
415 import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs';
416 import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
417 import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs';
418 import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs';
419 import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs';
420 import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs';
421 import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs';
422 import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs';
423 import { PayeePubKey } from '../structs/PayeePubKey.mjs';
424 import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs';
425 import { PrivateRoute } from '../structs/PrivateRoute.mjs';
426 import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
427 import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
428 import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs';
429 import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs';
430 import { Description } from '../structs/Description.mjs';
431 import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
432 import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
433 import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
434 import { BigSize } from '../structs/BigSize.mjs';
435 import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs';
436 import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs';
437 import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs';
438 import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs';
439 import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs';
440 import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs';
441 import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs';
442 import { Result_ReceiveTlvsDecodeErrorZ } from '../structs/Result_ReceiveTlvsDecodeErrorZ.mjs';
443 import { PaymentRelay } from '../structs/PaymentRelay.mjs';
444 import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs';
445 import { PaymentConstraints } from '../structs/PaymentConstraints.mjs';
446 import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs';
447 import { PaymentError } from '../structs/PaymentError.mjs';
448 import { Result_ThirtyTwoBytesPaymentErrorZ } from '../structs/Result_ThirtyTwoBytesPaymentErrorZ.mjs';
449 import { Result_NonePaymentErrorZ } from '../structs/Result_NonePaymentErrorZ.mjs';
450 import { ProbingError } from '../structs/ProbingError.mjs';
451 import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ.mjs';
452 import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs';
453 import { OnionMessagePath } from '../structs/OnionMessagePath.mjs';
454 import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs';
455 import { TwoTuple_PublicKeyOnionMessageZ } from '../structs/TwoTuple_PublicKeyOnionMessageZ.mjs';
456 import { SendError } from '../structs/SendError.mjs';
457 import { Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ } from '../structs/Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ.mjs';
458 import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs';
459 import { PeeledOnion } from '../structs/PeeledOnion.mjs';
460 import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs';
461 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
462 import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs';
463 import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs';
464 import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs';
465 import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
466 import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs';
467 import { WatchedOutput } from '../structs/WatchedOutput.mjs';
468 import { Filter, FilterInterface } from '../structs/Filter.mjs';
469 import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
470 import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
471 import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
472 import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
473 import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs';
474 import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs';
475 import { ChannelUsage } from '../structs/ChannelUsage.mjs';
476 import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs';
477 import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs';
478 import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs';
479 import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
480 import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
481 import { Persister, PersisterInterface } from '../structs/Persister.mjs';
482 import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs';
483 import { Persist, PersistInterface } from '../structs/Persist.mjs';
484 import { PrintableString } from '../structs/PrintableString.mjs';
485 import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
486 import { Future } from '../structs/Future.mjs';
487 import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
488 import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
489 import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs';
490 import { UserConfig } from '../structs/UserConfig.mjs';
491 import { BestBlock } from '../structs/BestBlock.mjs';
492 import { Listen, ListenInterface } from '../structs/Listen.mjs';
493 import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
494 import { ChainMonitor } from '../structs/ChainMonitor.mjs';
495 import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
496 import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
497 import { FailureCode } from '../structs/FailureCode.mjs';
498 import { ChainParameters } from '../structs/ChainParameters.mjs';
499 import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
500 import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
501 import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs';
502 import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
503 import { ExpandedKey } from '../structs/ExpandedKey.mjs';
504 import { Packet } from '../structs/Packet.mjs';
505 import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
506 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
507 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
508 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
509 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
510 import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
511 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
512 import { MessageHandler } from '../structs/MessageHandler.mjs';
513 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
514 import { PeerManager } from '../structs/PeerManager.mjs';
515 import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
516 import { OfferFeatures } from '../structs/OfferFeatures.mjs';
517 import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs';
518 import { Amount } from '../structs/Amount.mjs';
519 import { Quantity } from '../structs/Quantity.mjs';
520 import { TaggedHash } from '../structs/TaggedHash.mjs';
521 import { ErroneousField } from '../structs/ErroneousField.mjs';
522 import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
523 import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
524 import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
525 import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
526 import { DefaultRouter } from '../structs/DefaultRouter.mjs';
527 import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs';
528 import { Payee } from '../structs/Payee.mjs';
529 import { Score, ScoreInterface } from '../structs/Score.mjs';
530 import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
531 import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs';
532 import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs';
533 import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs';
534 import { KeysManager } from '../structs/KeysManager.mjs';
535 import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
536 import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs';
537 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
538 import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs';
539 import { ForwardNode } from '../structs/ForwardNode.mjs';
540 import { ForwardTlvs } from '../structs/ForwardTlvs.mjs';
541 import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs';
542 import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs';
543 import { Wallet } from '../structs/Wallet.mjs';
544 import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs';
545 import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
546 import { GossipSync } from '../structs/GossipSync.mjs';
547 import { RawDataPart } from '../structs/RawDataPart.mjs';
548 import { Sha256 } from '../structs/Sha256.mjs';
549 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
550 import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs';
551 import { Fallback } from '../structs/Fallback.mjs';
552
553 import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
554 import * as bindings from '../bindings.mjs'
555
556 /**
557  * An Event which you should probably take some action in response to.
558  * 
559  * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
560  * them directly as they don't round-trip exactly (for example FundingGenerationReady is never
561  * written as it makes no sense to respond to it after reconnecting to peers).
562  */
563 export class Event extends CommonBase {
564         protected constructor(_dummy: null, ptr: bigint) { super(ptr, bindings.Event_free); }
565         /* @internal */
566         public static constr_from_ptr(ptr: bigint): Event {
567                 const raw_ty: number = bindings.LDKEvent_ty_from_ptr(ptr);
568                 switch (raw_ty) {
569                         case 0: return new Event_FundingGenerationReady(ptr);
570                         case 1: return new Event_PaymentClaimable(ptr);
571                         case 2: return new Event_PaymentClaimed(ptr);
572                         case 3: return new Event_InvoiceRequestFailed(ptr);
573                         case 4: return new Event_PaymentSent(ptr);
574                         case 5: return new Event_PaymentFailed(ptr);
575                         case 6: return new Event_PaymentPathSuccessful(ptr);
576                         case 7: return new Event_PaymentPathFailed(ptr);
577                         case 8: return new Event_ProbeSuccessful(ptr);
578                         case 9: return new Event_ProbeFailed(ptr);
579                         case 10: return new Event_PendingHTLCsForwardable(ptr);
580                         case 11: return new Event_HTLCIntercepted(ptr);
581                         case 12: return new Event_SpendableOutputs(ptr);
582                         case 13: return new Event_PaymentForwarded(ptr);
583                         case 14: return new Event_ChannelPending(ptr);
584                         case 15: return new Event_ChannelReady(ptr);
585                         case 16: return new Event_ChannelClosed(ptr);
586                         case 17: return new Event_DiscardFunding(ptr);
587                         case 18: return new Event_OpenChannelRequest(ptr);
588                         case 19: return new Event_HTLCHandlingFailed(ptr);
589                         case 20: return new Event_BumpTransaction(ptr);
590                         default:
591                                 throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
592                 }
593         }
594
595         public clone_ptr(): bigint {
596                 const ret: bigint = bindings.Event_clone_ptr(this.ptr);
597                 return ret;
598         }
599
600         /**
601          * Creates a copy of the Event
602          */
603         public clone(): Event {
604                 const ret: bigint = bindings.Event_clone(this.ptr);
605                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
606                 CommonBase.add_ref_from(ret_hu_conv, this);
607                 return ret_hu_conv;
608         }
609
610         /**
611          * Utility method to constructs a new FundingGenerationReady-variant Event
612          */
613         public static constructor_funding_generation_ready(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, channel_value_satoshis: bigint, output_script: Uint8Array, user_channel_id: bigint): Event {
614                 const ret: bigint = bindings.Event_funding_generation_ready(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), channel_value_satoshis, bindings.encodeUint8Array(output_script), bindings.encodeUint128(user_channel_id));
615                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
616                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
617                 return ret_hu_conv;
618         }
619
620         /**
621          * Utility method to constructs a new PaymentClaimable-variant Event
622          */
623         public static constructor_payment_claimable(receiver_node_id: Uint8Array, payment_hash: Uint8Array, onion_fields: RecipientOnionFields, amount_msat: bigint, counterparty_skimmed_fee_msat: bigint, purpose: PaymentPurpose, via_channel_id: Option_ThirtyTwoBytesZ, via_user_channel_id: Option_U128Z, claim_deadline: Option_u32Z): Event {
624                 const ret: bigint = bindings.Event_payment_claimable(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), onion_fields == null ? 0n : CommonBase.get_ptr_of(onion_fields), amount_msat, counterparty_skimmed_fee_msat, CommonBase.get_ptr_of(purpose), CommonBase.get_ptr_of(via_channel_id), CommonBase.get_ptr_of(via_user_channel_id), CommonBase.get_ptr_of(claim_deadline));
625                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
626                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
627                 CommonBase.add_ref_from(ret_hu_conv, onion_fields);
628                 CommonBase.add_ref_from(ret_hu_conv, purpose);
629                 CommonBase.add_ref_from(ret_hu_conv, via_channel_id);
630                 CommonBase.add_ref_from(ret_hu_conv, via_user_channel_id);
631                 CommonBase.add_ref_from(ret_hu_conv, claim_deadline);
632                 return ret_hu_conv;
633         }
634
635         /**
636          * Utility method to constructs a new PaymentClaimed-variant Event
637          */
638         public static constructor_payment_claimed(receiver_node_id: Uint8Array, payment_hash: Uint8Array, amount_msat: bigint, purpose: PaymentPurpose, htlcs: ClaimedHTLC[], sender_intended_total_msat: Option_u64Z): Event {
639                 const ret: bigint = bindings.Event_payment_claimed(bindings.encodeUint8Array(bindings.check_arr_len(receiver_node_id, 33)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), amount_msat, CommonBase.get_ptr_of(purpose), bindings.encodeUint64Array(htlcs.map(htlcs_conv_13 => htlcs_conv_13 == null ? 0n : CommonBase.get_ptr_of(htlcs_conv_13))), CommonBase.get_ptr_of(sender_intended_total_msat));
640                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
641                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
642                 CommonBase.add_ref_from(ret_hu_conv, purpose);
643                 htlcs.forEach((htlcs_conv_13: ClaimedHTLC) => { CommonBase.add_ref_from(ret_hu_conv, htlcs_conv_13); });
644                 CommonBase.add_ref_from(ret_hu_conv, sender_intended_total_msat);
645                 return ret_hu_conv;
646         }
647
648         /**
649          * Utility method to constructs a new InvoiceRequestFailed-variant Event
650          */
651         public static constructor_invoice_request_failed(payment_id: Uint8Array): Event {
652                 const ret: bigint = bindings.Event_invoice_request_failed(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)));
653                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
654                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
655                 return ret_hu_conv;
656         }
657
658         /**
659          * Utility method to constructs a new PaymentSent-variant Event
660          */
661         public static constructor_payment_sent(payment_id: Option_ThirtyTwoBytesZ, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: Option_u64Z): Event {
662                 const ret: bigint = bindings.Event_payment_sent(CommonBase.get_ptr_of(payment_id), bindings.encodeUint8Array(bindings.check_arr_len(payment_preimage, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(fee_paid_msat));
663                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
664                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
665                 CommonBase.add_ref_from(ret_hu_conv, payment_id);
666                 CommonBase.add_ref_from(ret_hu_conv, fee_paid_msat);
667                 return ret_hu_conv;
668         }
669
670         /**
671          * Utility method to constructs a new PaymentFailed-variant Event
672          */
673         public static constructor_payment_failed(payment_id: Uint8Array, payment_hash: Uint8Array, reason: Option_PaymentFailureReasonZ): Event {
674                 const ret: bigint = bindings.Event_payment_failed(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(reason));
675                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
676                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
677                 CommonBase.add_ref_from(ret_hu_conv, reason);
678                 return ret_hu_conv;
679         }
680
681         /**
682          * Utility method to constructs a new PaymentPathSuccessful-variant Event
683          */
684         public static constructor_payment_path_successful(payment_id: Uint8Array, payment_hash: Option_ThirtyTwoBytesZ, path: Path): Event {
685                 const ret: bigint = bindings.Event_payment_path_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(payment_hash), path == null ? 0n : CommonBase.get_ptr_of(path));
686                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
687                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
688                 CommonBase.add_ref_from(ret_hu_conv, payment_hash);
689                 CommonBase.add_ref_from(ret_hu_conv, path);
690                 return ret_hu_conv;
691         }
692
693         /**
694          * Utility method to constructs a new PaymentPathFailed-variant Event
695          */
696         public static constructor_payment_path_failed(payment_id: Option_ThirtyTwoBytesZ, payment_hash: Uint8Array, payment_failed_permanently: boolean, failure: PathFailure, path: Path, short_channel_id: Option_u64Z): Event {
697                 const ret: bigint = bindings.Event_payment_path_failed(CommonBase.get_ptr_of(payment_id), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), payment_failed_permanently, CommonBase.get_ptr_of(failure), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id));
698                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
699                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
700                 CommonBase.add_ref_from(ret_hu_conv, payment_id);
701                 CommonBase.add_ref_from(ret_hu_conv, failure);
702                 CommonBase.add_ref_from(ret_hu_conv, path);
703                 CommonBase.add_ref_from(ret_hu_conv, short_channel_id);
704                 return ret_hu_conv;
705         }
706
707         /**
708          * Utility method to constructs a new ProbeSuccessful-variant Event
709          */
710         public static constructor_probe_successful(payment_id: Uint8Array, payment_hash: Uint8Array, path: Path): Event {
711                 const ret: bigint = bindings.Event_probe_successful(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), path == null ? 0n : CommonBase.get_ptr_of(path));
712                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
713                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
714                 CommonBase.add_ref_from(ret_hu_conv, path);
715                 return ret_hu_conv;
716         }
717
718         /**
719          * Utility method to constructs a new ProbeFailed-variant Event
720          */
721         public static constructor_probe_failed(payment_id: Uint8Array, payment_hash: Uint8Array, path: Path, short_channel_id: Option_u64Z): Event {
722                 const ret: bigint = bindings.Event_probe_failed(bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(short_channel_id));
723                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
724                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
725                 CommonBase.add_ref_from(ret_hu_conv, path);
726                 CommonBase.add_ref_from(ret_hu_conv, short_channel_id);
727                 return ret_hu_conv;
728         }
729
730         /**
731          * Utility method to constructs a new PendingHTLCsForwardable-variant Event
732          */
733         public static constructor_pending_htlcs_forwardable(time_forwardable: bigint): Event {
734                 const ret: bigint = bindings.Event_pending_htlcs_forwardable(time_forwardable);
735                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
736                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
737                 return ret_hu_conv;
738         }
739
740         /**
741          * Utility method to constructs a new HTLCIntercepted-variant Event
742          */
743         public static constructor_htlcintercepted(intercept_id: Uint8Array, requested_next_hop_scid: bigint, payment_hash: Uint8Array, inbound_amount_msat: bigint, expected_outbound_amount_msat: bigint): Event {
744                 const ret: bigint = bindings.Event_htlcintercepted(bindings.encodeUint8Array(bindings.check_arr_len(intercept_id, 32)), requested_next_hop_scid, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), inbound_amount_msat, expected_outbound_amount_msat);
745                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
746                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
747                 return ret_hu_conv;
748         }
749
750         /**
751          * Utility method to constructs a new SpendableOutputs-variant Event
752          */
753         public static constructor_spendable_outputs(outputs: SpendableOutputDescriptor[], channel_id: Option_ThirtyTwoBytesZ): Event {
754                 const ret: bigint = bindings.Event_spendable_outputs(bindings.encodeUint64Array(outputs.map(outputs_conv_27 => CommonBase.get_ptr_of(outputs_conv_27))), CommonBase.get_ptr_of(channel_id));
755                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
756                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
757                 outputs.forEach((outputs_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(ret_hu_conv, outputs_conv_27); });
758                 CommonBase.add_ref_from(ret_hu_conv, channel_id);
759                 return ret_hu_conv;
760         }
761
762         /**
763          * Utility method to constructs a new PaymentForwarded-variant Event
764          */
765         public static constructor_payment_forwarded(prev_channel_id: Option_ThirtyTwoBytesZ, next_channel_id: Option_ThirtyTwoBytesZ, fee_earned_msat: Option_u64Z, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: Option_u64Z): Event {
766                 const ret: bigint = bindings.Event_payment_forwarded(CommonBase.get_ptr_of(prev_channel_id), CommonBase.get_ptr_of(next_channel_id), CommonBase.get_ptr_of(fee_earned_msat), claim_from_onchain_tx, CommonBase.get_ptr_of(outbound_amount_forwarded_msat));
767                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
768                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
769                 CommonBase.add_ref_from(ret_hu_conv, prev_channel_id);
770                 CommonBase.add_ref_from(ret_hu_conv, next_channel_id);
771                 CommonBase.add_ref_from(ret_hu_conv, fee_earned_msat);
772                 CommonBase.add_ref_from(ret_hu_conv, outbound_amount_forwarded_msat);
773                 return ret_hu_conv;
774         }
775
776         /**
777          * Utility method to constructs a new ChannelPending-variant Event
778          */
779         public static constructor_channel_pending(channel_id: Uint8Array, user_channel_id: bigint, former_temporary_channel_id: Option_ThirtyTwoBytesZ, counterparty_node_id: Uint8Array, funding_txo: OutPoint): Event {
780                 const ret: bigint = bindings.Event_channel_pending(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(former_temporary_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), funding_txo == null ? 0n : CommonBase.get_ptr_of(funding_txo));
781                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
782                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
783                 CommonBase.add_ref_from(ret_hu_conv, former_temporary_channel_id);
784                 CommonBase.add_ref_from(ret_hu_conv, funding_txo);
785                 return ret_hu_conv;
786         }
787
788         /**
789          * Utility method to constructs a new ChannelReady-variant Event
790          */
791         public static constructor_channel_ready(channel_id: Uint8Array, user_channel_id: bigint, counterparty_node_id: Uint8Array, channel_type: ChannelTypeFeatures): Event {
792                 const ret: bigint = bindings.Event_channel_ready(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), channel_type == null ? 0n : CommonBase.get_ptr_of(channel_type));
793                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
794                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
795                 CommonBase.add_ref_from(ret_hu_conv, channel_type);
796                 return ret_hu_conv;
797         }
798
799         /**
800          * Utility method to constructs a new ChannelClosed-variant Event
801          */
802         public static constructor_channel_closed(channel_id: Uint8Array, user_channel_id: bigint, reason: ClosureReason, counterparty_node_id: Uint8Array, channel_capacity_sats: Option_u64Z): Event {
803                 const ret: bigint = bindings.Event_channel_closed(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint128(user_channel_id), CommonBase.get_ptr_of(reason), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), CommonBase.get_ptr_of(channel_capacity_sats));
804                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
805                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
806                 CommonBase.add_ref_from(ret_hu_conv, reason);
807                 CommonBase.add_ref_from(ret_hu_conv, channel_capacity_sats);
808                 return ret_hu_conv;
809         }
810
811         /**
812          * Utility method to constructs a new DiscardFunding-variant Event
813          */
814         public static constructor_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): Event {
815                 const ret: bigint = bindings.Event_discard_funding(bindings.encodeUint8Array(bindings.check_arr_len(channel_id, 32)), bindings.encodeUint8Array(transaction));
816                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
817                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
818                 return ret_hu_conv;
819         }
820
821         /**
822          * Utility method to constructs a new OpenChannelRequest-variant Event
823          */
824         public static constructor_open_channel_request(temporary_channel_id: Uint8Array, counterparty_node_id: Uint8Array, funding_satoshis: bigint, push_msat: bigint, channel_type: ChannelTypeFeatures): Event {
825                 const ret: bigint = bindings.Event_open_channel_request(bindings.encodeUint8Array(bindings.check_arr_len(temporary_channel_id, 32)), bindings.encodeUint8Array(bindings.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, channel_type == null ? 0n : CommonBase.get_ptr_of(channel_type));
826                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
827                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
828                 CommonBase.add_ref_from(ret_hu_conv, channel_type);
829                 return ret_hu_conv;
830         }
831
832         /**
833          * Utility method to constructs a new HTLCHandlingFailed-variant Event
834          */
835         public static constructor_htlchandling_failed(prev_channel_id: Uint8Array, failed_next_destination: HTLCDestination): Event {
836                 const ret: bigint = bindings.Event_htlchandling_failed(bindings.encodeUint8Array(bindings.check_arr_len(prev_channel_id, 32)), CommonBase.get_ptr_of(failed_next_destination));
837                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
838                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
839                 CommonBase.add_ref_from(ret_hu_conv, failed_next_destination);
840                 return ret_hu_conv;
841         }
842
843         /**
844          * Utility method to constructs a new BumpTransaction-variant Event
845          */
846         public static constructor_bump_transaction(a: BumpTransactionEvent): Event {
847                 const ret: bigint = bindings.Event_bump_transaction(CommonBase.get_ptr_of(a));
848                 const ret_hu_conv: Event = Event.constr_from_ptr(ret);
849                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
850                 CommonBase.add_ref_from(ret_hu_conv, a);
851                 return ret_hu_conv;
852         }
853
854         /**
855          * Checks if two Events contain equal inner contents.
856          * This ignores pointers and is_owned flags and looks at the values in fields.
857          */
858         public eq(b: Event): boolean {
859                 const ret: boolean = bindings.Event_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
860                 return ret;
861         }
862
863         /**
864          * Serialize the Event object into a byte array which can be read by Event_read
865          */
866         public write(): Uint8Array {
867                 const ret: number = bindings.Event_write(this.ptr);
868                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
869                 return ret_conv;
870         }
871
872 }
873 /** A Event of type FundingGenerationReady */
874 export class Event_FundingGenerationReady extends Event {
875         /**
876          * The random channel_id we picked which you'll need to pass into
877          * [`ChannelManager::funding_transaction_generated`].
878          * 
879          * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
880          */
881         public temporary_channel_id: Uint8Array;
882         /**
883          * The counterparty's node_id, which you'll need to pass back into
884          * [`ChannelManager::funding_transaction_generated`].
885          * 
886          * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
887          */
888         public counterparty_node_id: Uint8Array;
889         /**
890          * The value, in satoshis, that the output should have.
891          */
892         public channel_value_satoshis: bigint;
893         /**
894          * The script which should be used in the transaction output.
895          */
896         public output_script: Uint8Array;
897         /**
898          * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
899          * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
900          * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
901          * `user_channel_id` will be randomized for an inbound channel.  This may be zero for objects
902          * serialized with LDK versions prior to 0.0.113.
903          * 
904          * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
905          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
906          * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
907          */
908         public user_channel_id: bigint;
909         /* @internal */
910         public constructor(ptr: bigint) {
911                 super(null, ptr);
912                 const temporary_channel_id: number = bindings.LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr);
913                 const temporary_channel_id_conv: Uint8Array = bindings.decodeUint8Array(temporary_channel_id);
914                 this.temporary_channel_id = temporary_channel_id_conv;
915                 const counterparty_node_id: number = bindings.LDKEvent_FundingGenerationReady_get_counterparty_node_id(ptr);
916                 const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
917                 this.counterparty_node_id = counterparty_node_id_conv;
918                 this.channel_value_satoshis = bindings.LDKEvent_FundingGenerationReady_get_channel_value_satoshis(ptr);
919                 const output_script: number = bindings.LDKEvent_FundingGenerationReady_get_output_script(ptr);
920                 const output_script_conv: Uint8Array = bindings.decodeUint8Array(output_script);
921                 this.output_script = output_script_conv;
922                 const user_channel_id: number = bindings.LDKEvent_FundingGenerationReady_get_user_channel_id(ptr);
923                 const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id);
924                 this.user_channel_id = user_channel_id_conv;
925         }
926 }
927 /** A Event of type PaymentClaimable */
928 export class Event_PaymentClaimable extends Event {
929         /**
930          * The node that will receive the payment after it has been claimed.
931          * This is useful to identify payments received via [phantom nodes].
932          * This field will always be filled in when the event was generated by LDK versions
933          * 0.0.113 and above.
934          * 
935          * [phantom nodes]: crate::sign::PhantomKeysManager
936          * 
937          * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
938          */
939         public receiver_node_id: Uint8Array;
940         /**
941          * The hash for which the preimage should be handed to the ChannelManager. Note that LDK will
942          * not stop you from registering duplicate payment hashes for inbound payments.
943          */
944         public payment_hash: Uint8Array;
945         /**
946          * The fields in the onion which were received with each HTLC. Only fields which were
947          * identical in each HTLC involved in the payment will be included here.
948          * 
949          * Payments received on LDK versions prior to 0.0.115 will have this field unset.
950          * 
951          * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
952          */
953         public onion_fields: RecipientOnionFields;
954         /**
955          * The value, in thousandths of a satoshi, that this payment is claimable for. May be greater
956          * than the invoice amount.
957          * 
958          * May be less than the invoice amount if [`ChannelConfig::accept_underpaying_htlcs`] is set
959          * and the previous hop took an extra fee.
960          * 
961          * # Note
962          * If [`ChannelConfig::accept_underpaying_htlcs`] is set and you claim without verifying this
963          * field, you may lose money!
964          * 
965          * [`ChannelConfig::accept_underpaying_htlcs`]: crate::util::config::ChannelConfig::accept_underpaying_htlcs
966          */
967         public amount_msat: bigint;
968         /**
969          * The value, in thousands of a satoshi, that was skimmed off of this payment as an extra fee
970          * taken by our channel counterparty.
971          * 
972          * Will always be 0 unless [`ChannelConfig::accept_underpaying_htlcs`] is set.
973          * 
974          * [`ChannelConfig::accept_underpaying_htlcs`]: crate::util::config::ChannelConfig::accept_underpaying_htlcs
975          */
976         public counterparty_skimmed_fee_msat: bigint;
977         /**
978          * Information for claiming this received payment, based on whether the purpose of the
979          * payment is to pay an invoice or to send a spontaneous payment.
980          */
981         public purpose: PaymentPurpose;
982         /**
983          * The `channel_id` indicating over which channel we received the payment.
984          */
985         public via_channel_id: Option_ThirtyTwoBytesZ;
986         /**
987          * The `user_channel_id` indicating over which channel we received the payment.
988          */
989         public via_user_channel_id: Option_U128Z;
990         /**
991          * The block height at which this payment will be failed back and will no longer be
992          * eligible for claiming.
993          * 
994          * Prior to this height, a call to [`ChannelManager::claim_funds`] is guaranteed to
995          * succeed, however you should wait for [`Event::PaymentClaimed`] to be sure.
996          * 
997          * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
998          */
999         public claim_deadline: Option_u32Z;
1000         /* @internal */
1001         public constructor(ptr: bigint) {
1002                 super(null, ptr);
1003                 const receiver_node_id: number = bindings.LDKEvent_PaymentClaimable_get_receiver_node_id(ptr);
1004                 const receiver_node_id_conv: Uint8Array = bindings.decodeUint8Array(receiver_node_id);
1005                 this.receiver_node_id = receiver_node_id_conv;
1006                 const payment_hash: number = bindings.LDKEvent_PaymentClaimable_get_payment_hash(ptr);
1007                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1008                 this.payment_hash = payment_hash_conv;
1009                 const onion_fields: bigint = bindings.LDKEvent_PaymentClaimable_get_onion_fields(ptr);
1010                 const onion_fields_hu_conv: RecipientOnionFields = new RecipientOnionFields(null, onion_fields);
1011                         CommonBase.add_ref_from(onion_fields_hu_conv, this);
1012                 this.onion_fields = onion_fields_hu_conv;
1013                 this.amount_msat = bindings.LDKEvent_PaymentClaimable_get_amount_msat(ptr);
1014                 this.counterparty_skimmed_fee_msat = bindings.LDKEvent_PaymentClaimable_get_counterparty_skimmed_fee_msat(ptr);
1015                 const purpose: bigint = bindings.LDKEvent_PaymentClaimable_get_purpose(ptr);
1016                 const purpose_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(purpose);
1017                         CommonBase.add_ref_from(purpose_hu_conv, this);
1018                 this.purpose = purpose_hu_conv;
1019                 const via_channel_id: bigint = bindings.LDKEvent_PaymentClaimable_get_via_channel_id(ptr);
1020                 const via_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id);
1021                         CommonBase.add_ref_from(via_channel_id_hu_conv, this);
1022                 this.via_channel_id = via_channel_id_hu_conv;
1023                 const via_user_channel_id: bigint = bindings.LDKEvent_PaymentClaimable_get_via_user_channel_id(ptr);
1024                 const via_user_channel_id_hu_conv: Option_U128Z = Option_U128Z.constr_from_ptr(via_user_channel_id);
1025                         CommonBase.add_ref_from(via_user_channel_id_hu_conv, this);
1026                 this.via_user_channel_id = via_user_channel_id_hu_conv;
1027                 const claim_deadline: bigint = bindings.LDKEvent_PaymentClaimable_get_claim_deadline(ptr);
1028                 const claim_deadline_hu_conv: Option_u32Z = Option_u32Z.constr_from_ptr(claim_deadline);
1029                         CommonBase.add_ref_from(claim_deadline_hu_conv, this);
1030                 this.claim_deadline = claim_deadline_hu_conv;
1031         }
1032 }
1033 /** A Event of type PaymentClaimed */
1034 export class Event_PaymentClaimed extends Event {
1035         /**
1036          * The node that received the payment.
1037          * This is useful to identify payments which were received via [phantom nodes].
1038          * This field will always be filled in when the event was generated by LDK versions
1039          * 0.0.113 and above.
1040          * 
1041          * [phantom nodes]: crate::sign::PhantomKeysManager
1042          * 
1043          * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
1044          */
1045         public receiver_node_id: Uint8Array;
1046         /**
1047          * The payment hash of the claimed payment. Note that LDK will not stop you from
1048          * registering duplicate payment hashes for inbound payments.
1049          */
1050         public payment_hash: Uint8Array;
1051         /**
1052          * The value, in thousandths of a satoshi, that this payment is for. May be greater than the
1053          * invoice amount.
1054          */
1055         public amount_msat: bigint;
1056         /**
1057          * The purpose of the claimed payment, i.e. whether the payment was for an invoice or a
1058          * spontaneous payment.
1059          */
1060         public purpose: PaymentPurpose;
1061         /**
1062          * The HTLCs that comprise the claimed payment. This will be empty for events serialized prior
1063          * to LDK version 0.0.117.
1064          */
1065         public htlcs: ClaimedHTLC[];
1066         /**
1067          * The sender-intended sum total of all the MPP parts. This will be `None` for events
1068          * serialized prior to LDK version 0.0.117.
1069          */
1070         public sender_intended_total_msat: Option_u64Z;
1071         /* @internal */
1072         public constructor(ptr: bigint) {
1073                 super(null, ptr);
1074                 const receiver_node_id: number = bindings.LDKEvent_PaymentClaimed_get_receiver_node_id(ptr);
1075                 const receiver_node_id_conv: Uint8Array = bindings.decodeUint8Array(receiver_node_id);
1076                 this.receiver_node_id = receiver_node_id_conv;
1077                 const payment_hash: number = bindings.LDKEvent_PaymentClaimed_get_payment_hash(ptr);
1078                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1079                 this.payment_hash = payment_hash_conv;
1080                 this.amount_msat = bindings.LDKEvent_PaymentClaimed_get_amount_msat(ptr);
1081                 const purpose: bigint = bindings.LDKEvent_PaymentClaimed_get_purpose(ptr);
1082                 const purpose_hu_conv: PaymentPurpose = PaymentPurpose.constr_from_ptr(purpose);
1083                         CommonBase.add_ref_from(purpose_hu_conv, this);
1084                 this.purpose = purpose_hu_conv;
1085                 const htlcs: number = bindings.LDKEvent_PaymentClaimed_get_htlcs(ptr);
1086                 const htlcs_conv_13_len: number = bindings.getArrayLength(htlcs);
1087                         const htlcs_conv_13_arr: ClaimedHTLC[] = new Array(htlcs_conv_13_len).fill(null);
1088                         for (var n = 0; n < htlcs_conv_13_len; n++) {
1089                                 const htlcs_conv_13: bigint = bindings.getU64ArrayElem(htlcs, n);
1090                                 const htlcs_conv_13_hu_conv: ClaimedHTLC = new ClaimedHTLC(null, htlcs_conv_13);
1091                                 CommonBase.add_ref_from(htlcs_conv_13_hu_conv, this);
1092                                 htlcs_conv_13_arr[n] = htlcs_conv_13_hu_conv;
1093                         }
1094                         bindings.freeWasmMemory(htlcs)
1095                 this.htlcs = htlcs_conv_13_arr;
1096                 const sender_intended_total_msat: bigint = bindings.LDKEvent_PaymentClaimed_get_sender_intended_total_msat(ptr);
1097                 const sender_intended_total_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(sender_intended_total_msat);
1098                         CommonBase.add_ref_from(sender_intended_total_msat_hu_conv, this);
1099                 this.sender_intended_total_msat = sender_intended_total_msat_hu_conv;
1100         }
1101 }
1102 /** A Event of type InvoiceRequestFailed */
1103 export class Event_InvoiceRequestFailed extends Event {
1104         /**
1105          * The `payment_id` to have been associated with payment for the requested invoice.
1106          */
1107         public payment_id: Uint8Array;
1108         /* @internal */
1109         public constructor(ptr: bigint) {
1110                 super(null, ptr);
1111                 const payment_id: number = bindings.LDKEvent_InvoiceRequestFailed_get_payment_id(ptr);
1112                 const payment_id_conv: Uint8Array = bindings.decodeUint8Array(payment_id);
1113                 this.payment_id = payment_id_conv;
1114         }
1115 }
1116 /** A Event of type PaymentSent */
1117 export class Event_PaymentSent extends Event {
1118         /**
1119          * The `payment_id` passed to [`ChannelManager::send_payment`].
1120          * 
1121          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1122          */
1123         public payment_id: Option_ThirtyTwoBytesZ;
1124         /**
1125          * The preimage to the hash given to ChannelManager::send_payment.
1126          * Note that this serves as a payment receipt, if you wish to have such a thing, you must
1127          * store it somehow!
1128          */
1129         public payment_preimage: Uint8Array;
1130         /**
1131          * The hash that was given to [`ChannelManager::send_payment`].
1132          * 
1133          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1134          */
1135         public payment_hash: Uint8Array;
1136         /**
1137          * The total fee which was spent at intermediate hops in this payment, across all paths.
1138          * 
1139          * Note that, like [`Route::get_total_fees`] this does *not* include any potential
1140          * overpayment to the recipient node.
1141          * 
1142          * If the recipient or an intermediate node misbehaves and gives us free money, this may
1143          * overstate the amount paid, though this is unlikely.
1144          * 
1145          * [`Route::get_total_fees`]: crate::routing::router::Route::get_total_fees
1146          */
1147         public fee_paid_msat: Option_u64Z;
1148         /* @internal */
1149         public constructor(ptr: bigint) {
1150                 super(null, ptr);
1151                 const payment_id: bigint = bindings.LDKEvent_PaymentSent_get_payment_id(ptr);
1152                 const payment_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_id);
1153                         CommonBase.add_ref_from(payment_id_hu_conv, this);
1154                 this.payment_id = payment_id_hu_conv;
1155                 const payment_preimage: number = bindings.LDKEvent_PaymentSent_get_payment_preimage(ptr);
1156                 const payment_preimage_conv: Uint8Array = bindings.decodeUint8Array(payment_preimage);
1157                 this.payment_preimage = payment_preimage_conv;
1158                 const payment_hash: number = bindings.LDKEvent_PaymentSent_get_payment_hash(ptr);
1159                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1160                 this.payment_hash = payment_hash_conv;
1161                 const fee_paid_msat: bigint = bindings.LDKEvent_PaymentSent_get_fee_paid_msat(ptr);
1162                 const fee_paid_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(fee_paid_msat);
1163                         CommonBase.add_ref_from(fee_paid_msat_hu_conv, this);
1164                 this.fee_paid_msat = fee_paid_msat_hu_conv;
1165         }
1166 }
1167 /** A Event of type PaymentFailed */
1168 export class Event_PaymentFailed extends Event {
1169         /**
1170          * The `payment_id` passed to [`ChannelManager::send_payment`].
1171          * 
1172          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1173          */
1174         public payment_id: Uint8Array;
1175         /**
1176          * The hash that was given to [`ChannelManager::send_payment`].
1177          * 
1178          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1179          */
1180         public payment_hash: Uint8Array;
1181         /**
1182          * The reason the payment failed. This is only `None` for events generated or serialized
1183          * by versions prior to 0.0.115.
1184          */
1185         public reason: Option_PaymentFailureReasonZ;
1186         /* @internal */
1187         public constructor(ptr: bigint) {
1188                 super(null, ptr);
1189                 const payment_id: number = bindings.LDKEvent_PaymentFailed_get_payment_id(ptr);
1190                 const payment_id_conv: Uint8Array = bindings.decodeUint8Array(payment_id);
1191                 this.payment_id = payment_id_conv;
1192                 const payment_hash: number = bindings.LDKEvent_PaymentFailed_get_payment_hash(ptr);
1193                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1194                 this.payment_hash = payment_hash_conv;
1195                 const reason: bigint = bindings.LDKEvent_PaymentFailed_get_reason(ptr);
1196                 const reason_hu_conv: Option_PaymentFailureReasonZ = Option_PaymentFailureReasonZ.constr_from_ptr(reason);
1197                         CommonBase.add_ref_from(reason_hu_conv, this);
1198                 this.reason = reason_hu_conv;
1199         }
1200 }
1201 /** A Event of type PaymentPathSuccessful */
1202 export class Event_PaymentPathSuccessful extends Event {
1203         /**
1204          * The `payment_id` passed to [`ChannelManager::send_payment`].
1205          * 
1206          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1207          */
1208         public payment_id: Uint8Array;
1209         /**
1210          * The hash that was given to [`ChannelManager::send_payment`].
1211          * 
1212          * This will be `Some` for all payments which completed on LDK 0.0.104 or later.
1213          * 
1214          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1215          */
1216         public payment_hash: Option_ThirtyTwoBytesZ;
1217         /**
1218          * The payment path that was successful.
1219          * 
1220          * May contain a closed channel if the HTLC sent along the path was fulfilled on chain.
1221          */
1222         public path: Path;
1223         /* @internal */
1224         public constructor(ptr: bigint) {
1225                 super(null, ptr);
1226                 const payment_id: number = bindings.LDKEvent_PaymentPathSuccessful_get_payment_id(ptr);
1227                 const payment_id_conv: Uint8Array = bindings.decodeUint8Array(payment_id);
1228                 this.payment_id = payment_id_conv;
1229                 const payment_hash: bigint = bindings.LDKEvent_PaymentPathSuccessful_get_payment_hash(ptr);
1230                 const payment_hash_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_hash);
1231                         CommonBase.add_ref_from(payment_hash_hu_conv, this);
1232                 this.payment_hash = payment_hash_hu_conv;
1233                 const path: bigint = bindings.LDKEvent_PaymentPathSuccessful_get_path(ptr);
1234                 const path_hu_conv: Path = new Path(null, path);
1235                         CommonBase.add_ref_from(path_hu_conv, this);
1236                 this.path = path_hu_conv;
1237         }
1238 }
1239 /** A Event of type PaymentPathFailed */
1240 export class Event_PaymentPathFailed extends Event {
1241         /**
1242          * The `payment_id` passed to [`ChannelManager::send_payment`].
1243          * 
1244          * This will be `Some` for all payment paths which failed on LDK 0.0.103 or later.
1245          * 
1246          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1247          * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
1248          */
1249         public payment_id: Option_ThirtyTwoBytesZ;
1250         /**
1251          * The hash that was given to [`ChannelManager::send_payment`].
1252          * 
1253          * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
1254          */
1255         public payment_hash: Uint8Array;
1256         /**
1257          * Indicates the payment was rejected for some reason by the recipient. This implies that
1258          * the payment has failed, not just the route in question. If this is not set, the payment may
1259          * be retried via a different route.
1260          */
1261         public payment_failed_permanently: boolean;
1262         /**
1263          * Extra error details based on the failure type. May contain an update that needs to be
1264          * applied to the [`NetworkGraph`].
1265          * 
1266          * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
1267          */
1268         public failure: PathFailure;
1269         /**
1270          * The payment path that failed.
1271          */
1272         public path: Path;
1273         /**
1274          * The channel responsible for the failed payment path.
1275          * 
1276          * Note that for route hints or for the first hop in a path this may be an SCID alias and
1277          * may not refer to a channel in the public network graph. These aliases may also collide
1278          * with channels in the public network graph.
1279          * 
1280          * If this is `Some`, then the corresponding channel should be avoided when the payment is
1281          * retried. May be `None` for older [`Event`] serializations.
1282          */
1283         public short_channel_id: Option_u64Z;
1284         /* @internal */
1285         public constructor(ptr: bigint) {
1286                 super(null, ptr);
1287                 const payment_id: bigint = bindings.LDKEvent_PaymentPathFailed_get_payment_id(ptr);
1288                 const payment_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(payment_id);
1289                         CommonBase.add_ref_from(payment_id_hu_conv, this);
1290                 this.payment_id = payment_id_hu_conv;
1291                 const payment_hash: number = bindings.LDKEvent_PaymentPathFailed_get_payment_hash(ptr);
1292                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1293                 this.payment_hash = payment_hash_conv;
1294                 this.payment_failed_permanently = bindings.LDKEvent_PaymentPathFailed_get_payment_failed_permanently(ptr);
1295                 const failure: bigint = bindings.LDKEvent_PaymentPathFailed_get_failure(ptr);
1296                 const failure_hu_conv: PathFailure = PathFailure.constr_from_ptr(failure);
1297                         CommonBase.add_ref_from(failure_hu_conv, this);
1298                 this.failure = failure_hu_conv;
1299                 const path: bigint = bindings.LDKEvent_PaymentPathFailed_get_path(ptr);
1300                 const path_hu_conv: Path = new Path(null, path);
1301                         CommonBase.add_ref_from(path_hu_conv, this);
1302                 this.path = path_hu_conv;
1303                 const short_channel_id: bigint = bindings.LDKEvent_PaymentPathFailed_get_short_channel_id(ptr);
1304                 const short_channel_id_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(short_channel_id);
1305                         CommonBase.add_ref_from(short_channel_id_hu_conv, this);
1306                 this.short_channel_id = short_channel_id_hu_conv;
1307         }
1308 }
1309 /** A Event of type ProbeSuccessful */
1310 export class Event_ProbeSuccessful extends Event {
1311         /**
1312          * The id returned by [`ChannelManager::send_probe`].
1313          * 
1314          * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
1315          */
1316         public payment_id: Uint8Array;
1317         /**
1318          * The hash generated by [`ChannelManager::send_probe`].
1319          * 
1320          * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
1321          */
1322         public payment_hash: Uint8Array;
1323         /**
1324          * The payment path that was successful.
1325          */
1326         public path: Path;
1327         /* @internal */
1328         public constructor(ptr: bigint) {
1329                 super(null, ptr);
1330                 const payment_id: number = bindings.LDKEvent_ProbeSuccessful_get_payment_id(ptr);
1331                 const payment_id_conv: Uint8Array = bindings.decodeUint8Array(payment_id);
1332                 this.payment_id = payment_id_conv;
1333                 const payment_hash: number = bindings.LDKEvent_ProbeSuccessful_get_payment_hash(ptr);
1334                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1335                 this.payment_hash = payment_hash_conv;
1336                 const path: bigint = bindings.LDKEvent_ProbeSuccessful_get_path(ptr);
1337                 const path_hu_conv: Path = new Path(null, path);
1338                         CommonBase.add_ref_from(path_hu_conv, this);
1339                 this.path = path_hu_conv;
1340         }
1341 }
1342 /** A Event of type ProbeFailed */
1343 export class Event_ProbeFailed extends Event {
1344         /**
1345          * The id returned by [`ChannelManager::send_probe`].
1346          * 
1347          * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
1348          */
1349         public payment_id: Uint8Array;
1350         /**
1351          * The hash generated by [`ChannelManager::send_probe`].
1352          * 
1353          * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
1354          */
1355         public payment_hash: Uint8Array;
1356         /**
1357          * The payment path that failed.
1358          */
1359         public path: Path;
1360         /**
1361          * The channel responsible for the failed probe.
1362          * 
1363          * Note that for route hints or for the first hop in a path this may be an SCID alias and
1364          * may not refer to a channel in the public network graph. These aliases may also collide
1365          * with channels in the public network graph.
1366          */
1367         public short_channel_id: Option_u64Z;
1368         /* @internal */
1369         public constructor(ptr: bigint) {
1370                 super(null, ptr);
1371                 const payment_id: number = bindings.LDKEvent_ProbeFailed_get_payment_id(ptr);
1372                 const payment_id_conv: Uint8Array = bindings.decodeUint8Array(payment_id);
1373                 this.payment_id = payment_id_conv;
1374                 const payment_hash: number = bindings.LDKEvent_ProbeFailed_get_payment_hash(ptr);
1375                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1376                 this.payment_hash = payment_hash_conv;
1377                 const path: bigint = bindings.LDKEvent_ProbeFailed_get_path(ptr);
1378                 const path_hu_conv: Path = new Path(null, path);
1379                         CommonBase.add_ref_from(path_hu_conv, this);
1380                 this.path = path_hu_conv;
1381                 const short_channel_id: bigint = bindings.LDKEvent_ProbeFailed_get_short_channel_id(ptr);
1382                 const short_channel_id_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(short_channel_id);
1383                         CommonBase.add_ref_from(short_channel_id_hu_conv, this);
1384                 this.short_channel_id = short_channel_id_hu_conv;
1385         }
1386 }
1387 /** A Event of type PendingHTLCsForwardable */
1388 export class Event_PendingHTLCsForwardable extends Event {
1389         /**
1390          * The minimum amount of time that should be waited prior to calling
1391          * process_pending_htlc_forwards. To increase the effort required to correlate payments,
1392          * you should wait a random amount of time in roughly the range (now + time_forwardable,
1393          * now + 5*time_forwardable).
1394          */
1395         public time_forwardable: bigint;
1396         /* @internal */
1397         public constructor(ptr: bigint) {
1398                 super(null, ptr);
1399                 this.time_forwardable = bindings.LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr);
1400         }
1401 }
1402 /** A Event of type HTLCIntercepted */
1403 export class Event_HTLCIntercepted extends Event {
1404         /**
1405          * An id to help LDK identify which HTLC is being forwarded or failed.
1406          */
1407         public intercept_id: Uint8Array;
1408         /**
1409          * The fake scid that was programmed as the next hop's scid, generated using
1410          * [`ChannelManager::get_intercept_scid`].
1411          * 
1412          * [`ChannelManager::get_intercept_scid`]: crate::ln::channelmanager::ChannelManager::get_intercept_scid
1413          */
1414         public requested_next_hop_scid: bigint;
1415         /**
1416          * The payment hash used for this HTLC.
1417          */
1418         public payment_hash: Uint8Array;
1419         /**
1420          * How many msats were received on the inbound edge of this HTLC.
1421          */
1422         public inbound_amount_msat: bigint;
1423         /**
1424          * How many msats the payer intended to route to the next node. Depending on the reason you are
1425          * intercepting this payment, you might take a fee by forwarding less than this amount.
1426          * Forwarding less than this amount may break compatibility with LDK versions prior to 0.0.116.
1427          * 
1428          * Note that LDK will NOT check that expected fees were factored into this value. You MUST
1429          * check that whatever fee you want has been included here or subtract it as required. Further,
1430          * LDK will not stop you from forwarding more than you received.
1431          */
1432         public expected_outbound_amount_msat: bigint;
1433         /* @internal */
1434         public constructor(ptr: bigint) {
1435                 super(null, ptr);
1436                 const intercept_id: number = bindings.LDKEvent_HTLCIntercepted_get_intercept_id(ptr);
1437                 const intercept_id_conv: Uint8Array = bindings.decodeUint8Array(intercept_id);
1438                 this.intercept_id = intercept_id_conv;
1439                 this.requested_next_hop_scid = bindings.LDKEvent_HTLCIntercepted_get_requested_next_hop_scid(ptr);
1440                 const payment_hash: number = bindings.LDKEvent_HTLCIntercepted_get_payment_hash(ptr);
1441                 const payment_hash_conv: Uint8Array = bindings.decodeUint8Array(payment_hash);
1442                 this.payment_hash = payment_hash_conv;
1443                 this.inbound_amount_msat = bindings.LDKEvent_HTLCIntercepted_get_inbound_amount_msat(ptr);
1444                 this.expected_outbound_amount_msat = bindings.LDKEvent_HTLCIntercepted_get_expected_outbound_amount_msat(ptr);
1445         }
1446 }
1447 /** A Event of type SpendableOutputs */
1448 export class Event_SpendableOutputs extends Event {
1449         /**
1450          * The outputs which you should store as spendable by you.
1451          */
1452         public outputs: SpendableOutputDescriptor[];
1453         /**
1454          * The `channel_id` indicating which channel the spendable outputs belong to.
1455          * 
1456          * This will always be `Some` for events generated by LDK versions 0.0.117 and above.
1457          */
1458         public channel_id: Option_ThirtyTwoBytesZ;
1459         /* @internal */
1460         public constructor(ptr: bigint) {
1461                 super(null, ptr);
1462                 const outputs: number = bindings.LDKEvent_SpendableOutputs_get_outputs(ptr);
1463                 const outputs_conv_27_len: number = bindings.getArrayLength(outputs);
1464                         const outputs_conv_27_arr: SpendableOutputDescriptor[] = new Array(outputs_conv_27_len).fill(null);
1465                         for (var b = 0; b < outputs_conv_27_len; b++) {
1466                                 const outputs_conv_27: bigint = bindings.getU64ArrayElem(outputs, b);
1467                                 const outputs_conv_27_hu_conv: SpendableOutputDescriptor = SpendableOutputDescriptor.constr_from_ptr(outputs_conv_27);
1468                                 CommonBase.add_ref_from(outputs_conv_27_hu_conv, this);
1469                                 outputs_conv_27_arr[b] = outputs_conv_27_hu_conv;
1470                         }
1471                         bindings.freeWasmMemory(outputs)
1472                 this.outputs = outputs_conv_27_arr;
1473                 const channel_id: bigint = bindings.LDKEvent_SpendableOutputs_get_channel_id(ptr);
1474                 const channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id);
1475                         CommonBase.add_ref_from(channel_id_hu_conv, this);
1476                 this.channel_id = channel_id_hu_conv;
1477         }
1478 }
1479 /** A Event of type PaymentForwarded */
1480 export class Event_PaymentForwarded extends Event {
1481         /**
1482          * The incoming channel between the previous node and us. This is only `None` for events
1483          * generated or serialized by versions prior to 0.0.107.
1484          */
1485         public prev_channel_id: Option_ThirtyTwoBytesZ;
1486         /**
1487          * The outgoing channel between the next node and us. This is only `None` for events
1488          * generated or serialized by versions prior to 0.0.107.
1489          */
1490         public next_channel_id: Option_ThirtyTwoBytesZ;
1491         /**
1492          * The fee, in milli-satoshis, which was earned as a result of the payment.
1493          * 
1494          * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
1495          * was pending, the amount the next hop claimed will have been rounded down to the nearest
1496          * whole satoshi. Thus, the fee calculated here may be higher than expected as we still
1497          * claimed the full value in millisatoshis from the source. In this case,
1498          * `claim_from_onchain_tx` will be set.
1499          * 
1500          * If the channel which sent us the payment has been force-closed, we will claim the funds
1501          * via an on-chain transaction. In that case we do not yet know the on-chain transaction
1502          * fees which we will spend and will instead set this to `None`. It is possible duplicate
1503          * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is
1504          * `None`.
1505          */
1506         public fee_earned_msat: Option_u64Z;
1507         /**
1508          * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain
1509          * transaction.
1510          */
1511         public claim_from_onchain_tx: boolean;
1512         /**
1513          * The final amount forwarded, in milli-satoshis, after the fee is deducted.
1514          * 
1515          * The caveat described above the `fee_earned_msat` field applies here as well.
1516          */
1517         public outbound_amount_forwarded_msat: Option_u64Z;
1518         /* @internal */
1519         public constructor(ptr: bigint) {
1520                 super(null, ptr);
1521                 const prev_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_prev_channel_id(ptr);
1522                 const prev_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id);
1523                         CommonBase.add_ref_from(prev_channel_id_hu_conv, this);
1524                 this.prev_channel_id = prev_channel_id_hu_conv;
1525                 const next_channel_id: bigint = bindings.LDKEvent_PaymentForwarded_get_next_channel_id(ptr);
1526                 const next_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id);
1527                         CommonBase.add_ref_from(next_channel_id_hu_conv, this);
1528                 this.next_channel_id = next_channel_id_hu_conv;
1529                 const fee_earned_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr);
1530                 const fee_earned_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(fee_earned_msat);
1531                         CommonBase.add_ref_from(fee_earned_msat_hu_conv, this);
1532                 this.fee_earned_msat = fee_earned_msat_hu_conv;
1533                 this.claim_from_onchain_tx = bindings.LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr);
1534                 const outbound_amount_forwarded_msat: bigint = bindings.LDKEvent_PaymentForwarded_get_outbound_amount_forwarded_msat(ptr);
1535                 const outbound_amount_forwarded_msat_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat);
1536                         CommonBase.add_ref_from(outbound_amount_forwarded_msat_hu_conv, this);
1537                 this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat_hu_conv;
1538         }
1539 }
1540 /** A Event of type ChannelPending */
1541 export class Event_ChannelPending extends Event {
1542         /**
1543          * The `channel_id` of the channel that is pending confirmation.
1544          */
1545         public channel_id: Uint8Array;
1546         /**
1547          * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
1548          * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
1549          * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
1550          * `user_channel_id` will be randomized for an inbound channel.
1551          * 
1552          * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
1553          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1554          * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
1555          */
1556         public user_channel_id: bigint;
1557         /**
1558          * The `temporary_channel_id` this channel used to be known by during channel establishment.
1559          * 
1560          * Will be `None` for channels created prior to LDK version 0.0.115.
1561          */
1562         public former_temporary_channel_id: Option_ThirtyTwoBytesZ;
1563         /**
1564          * The `node_id` of the channel counterparty.
1565          */
1566         public counterparty_node_id: Uint8Array;
1567         /**
1568          * The outpoint of the channel's funding transaction.
1569          */
1570         public funding_txo: OutPoint;
1571         /* @internal */
1572         public constructor(ptr: bigint) {
1573                 super(null, ptr);
1574                 const channel_id: number = bindings.LDKEvent_ChannelPending_get_channel_id(ptr);
1575                 const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id);
1576                 this.channel_id = channel_id_conv;
1577                 const user_channel_id: number = bindings.LDKEvent_ChannelPending_get_user_channel_id(ptr);
1578                 const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id);
1579                 this.user_channel_id = user_channel_id_conv;
1580                 const former_temporary_channel_id: bigint = bindings.LDKEvent_ChannelPending_get_former_temporary_channel_id(ptr);
1581                 const former_temporary_channel_id_hu_conv: Option_ThirtyTwoBytesZ = Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id);
1582                         CommonBase.add_ref_from(former_temporary_channel_id_hu_conv, this);
1583                 this.former_temporary_channel_id = former_temporary_channel_id_hu_conv;
1584                 const counterparty_node_id: number = bindings.LDKEvent_ChannelPending_get_counterparty_node_id(ptr);
1585                 const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
1586                 this.counterparty_node_id = counterparty_node_id_conv;
1587                 const funding_txo: bigint = bindings.LDKEvent_ChannelPending_get_funding_txo(ptr);
1588                 const funding_txo_hu_conv: OutPoint = new OutPoint(null, funding_txo);
1589                         CommonBase.add_ref_from(funding_txo_hu_conv, this);
1590                 this.funding_txo = funding_txo_hu_conv;
1591         }
1592 }
1593 /** A Event of type ChannelReady */
1594 export class Event_ChannelReady extends Event {
1595         /**
1596          * The `channel_id` of the channel that is ready.
1597          */
1598         public channel_id: Uint8Array;
1599         /**
1600          * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
1601          * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
1602          * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
1603          * `user_channel_id` will be randomized for an inbound channel.
1604          * 
1605          * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
1606          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1607          * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
1608          */
1609         public user_channel_id: bigint;
1610         /**
1611          * The `node_id` of the channel counterparty.
1612          */
1613         public counterparty_node_id: Uint8Array;
1614         /**
1615          * The features that this channel will operate with.
1616          */
1617         public channel_type: ChannelTypeFeatures;
1618         /* @internal */
1619         public constructor(ptr: bigint) {
1620                 super(null, ptr);
1621                 const channel_id: number = bindings.LDKEvent_ChannelReady_get_channel_id(ptr);
1622                 const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id);
1623                 this.channel_id = channel_id_conv;
1624                 const user_channel_id: number = bindings.LDKEvent_ChannelReady_get_user_channel_id(ptr);
1625                 const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id);
1626                 this.user_channel_id = user_channel_id_conv;
1627                 const counterparty_node_id: number = bindings.LDKEvent_ChannelReady_get_counterparty_node_id(ptr);
1628                 const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
1629                 this.counterparty_node_id = counterparty_node_id_conv;
1630                 const channel_type: bigint = bindings.LDKEvent_ChannelReady_get_channel_type(ptr);
1631                 const channel_type_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, channel_type);
1632                         CommonBase.add_ref_from(channel_type_hu_conv, this);
1633                 this.channel_type = channel_type_hu_conv;
1634         }
1635 }
1636 /** A Event of type ChannelClosed */
1637 export class Event_ChannelClosed extends Event {
1638         /**
1639          * The `channel_id` of the channel which has been closed. Note that on-chain transactions
1640          * resolving the channel are likely still awaiting confirmation.
1641          */
1642         public channel_id: Uint8Array;
1643         /**
1644          * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
1645          * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
1646          * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
1647          * `user_channel_id` will be randomized for inbound channels.
1648          * This may be zero for inbound channels serialized prior to 0.0.113 and will always be
1649          * zero for objects serialized with LDK versions prior to 0.0.102.
1650          * 
1651          * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
1652          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1653          * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
1654          */
1655         public user_channel_id: bigint;
1656         /**
1657          * The reason the channel was closed.
1658          */
1659         public reason: ClosureReason;
1660         /**
1661          * Counterparty in the closed channel.
1662          * 
1663          * This field will be `None` for objects serialized prior to LDK 0.0.117.
1664          * 
1665          * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
1666          */
1667         public counterparty_node_id: Uint8Array;
1668         /**
1669          * Channel capacity of the closing channel (sats).
1670          * 
1671          * This field will be `None` for objects serialized prior to LDK 0.0.117.
1672          */
1673         public channel_capacity_sats: Option_u64Z;
1674         /* @internal */
1675         public constructor(ptr: bigint) {
1676                 super(null, ptr);
1677                 const channel_id: number = bindings.LDKEvent_ChannelClosed_get_channel_id(ptr);
1678                 const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id);
1679                 this.channel_id = channel_id_conv;
1680                 const user_channel_id: number = bindings.LDKEvent_ChannelClosed_get_user_channel_id(ptr);
1681                 const user_channel_id_conv: bigint = bindings.decodeUint128(user_channel_id);
1682                 this.user_channel_id = user_channel_id_conv;
1683                 const reason: bigint = bindings.LDKEvent_ChannelClosed_get_reason(ptr);
1684                 const reason_hu_conv: ClosureReason = ClosureReason.constr_from_ptr(reason);
1685                         CommonBase.add_ref_from(reason_hu_conv, this);
1686                 this.reason = reason_hu_conv;
1687                 const counterparty_node_id: number = bindings.LDKEvent_ChannelClosed_get_counterparty_node_id(ptr);
1688                 const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
1689                 this.counterparty_node_id = counterparty_node_id_conv;
1690                 const channel_capacity_sats: bigint = bindings.LDKEvent_ChannelClosed_get_channel_capacity_sats(ptr);
1691                 const channel_capacity_sats_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(channel_capacity_sats);
1692                         CommonBase.add_ref_from(channel_capacity_sats_hu_conv, this);
1693                 this.channel_capacity_sats = channel_capacity_sats_hu_conv;
1694         }
1695 }
1696 /** A Event of type DiscardFunding */
1697 export class Event_DiscardFunding extends Event {
1698         /**
1699          * The channel_id of the channel which has been closed.
1700          */
1701         public channel_id: Uint8Array;
1702         /**
1703          * The full transaction received from the user
1704          */
1705         public transaction: Uint8Array;
1706         /* @internal */
1707         public constructor(ptr: bigint) {
1708                 super(null, ptr);
1709                 const channel_id: number = bindings.LDKEvent_DiscardFunding_get_channel_id(ptr);
1710                 const channel_id_conv: Uint8Array = bindings.decodeUint8Array(channel_id);
1711                 this.channel_id = channel_id_conv;
1712                 const transaction: number = bindings.LDKEvent_DiscardFunding_get_transaction(ptr);
1713                 const transaction_conv: Uint8Array = bindings.decodeUint8Array(transaction);
1714                 this.transaction = transaction_conv;
1715         }
1716 }
1717 /** A Event of type OpenChannelRequest */
1718 export class Event_OpenChannelRequest extends Event {
1719         /**
1720          * The temporary channel ID of the channel requested to be opened.
1721          * 
1722          * When responding to the request, the `temporary_channel_id` should be passed
1723          * back to the ChannelManager through [`ChannelManager::accept_inbound_channel`] to accept,
1724          * or through [`ChannelManager::force_close_without_broadcasting_txn`] to reject.
1725          * 
1726          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1727          * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
1728          */
1729         public temporary_channel_id: Uint8Array;
1730         /**
1731          * The node_id of the counterparty requesting to open the channel.
1732          * 
1733          * When responding to the request, the `counterparty_node_id` should be passed
1734          * back to the `ChannelManager` through [`ChannelManager::accept_inbound_channel`] to
1735          * accept the request, or through [`ChannelManager::force_close_without_broadcasting_txn`] to reject the
1736          * request.
1737          * 
1738          * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
1739          * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
1740          */
1741         public counterparty_node_id: Uint8Array;
1742         /**
1743          * The channel value of the requested channel.
1744          */
1745         public funding_satoshis: bigint;
1746         /**
1747          * Our starting balance in the channel if the request is accepted, in milli-satoshi.
1748          */
1749         public push_msat: bigint;
1750         /**
1751          * The features that this channel will operate with. If you reject the channel, a
1752          * well-behaved counterparty may automatically re-attempt the channel with a new set of
1753          * feature flags.
1754          * 
1755          * Note that if [`ChannelTypeFeatures::supports_scid_privacy`] returns true on this type,
1756          * the resulting [`ChannelManager`] will not be readable by versions of LDK prior to
1757          * 0.0.106.
1758          * 
1759          * Furthermore, note that if [`ChannelTypeFeatures::supports_zero_conf`] returns true on this type,
1760          * the resulting [`ChannelManager`] will not be readable by versions of LDK prior to
1761          * 0.0.107. Channels setting this type also need to get manually accepted via
1762          * [`crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`],
1763          * or will be rejected otherwise.
1764          * 
1765          * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
1766          */
1767         public channel_type: ChannelTypeFeatures;
1768         /* @internal */
1769         public constructor(ptr: bigint) {
1770                 super(null, ptr);
1771                 const temporary_channel_id: number = bindings.LDKEvent_OpenChannelRequest_get_temporary_channel_id(ptr);
1772                 const temporary_channel_id_conv: Uint8Array = bindings.decodeUint8Array(temporary_channel_id);
1773                 this.temporary_channel_id = temporary_channel_id_conv;
1774                 const counterparty_node_id: number = bindings.LDKEvent_OpenChannelRequest_get_counterparty_node_id(ptr);
1775                 const counterparty_node_id_conv: Uint8Array = bindings.decodeUint8Array(counterparty_node_id);
1776                 this.counterparty_node_id = counterparty_node_id_conv;
1777                 this.funding_satoshis = bindings.LDKEvent_OpenChannelRequest_get_funding_satoshis(ptr);
1778                 this.push_msat = bindings.LDKEvent_OpenChannelRequest_get_push_msat(ptr);
1779                 const channel_type: bigint = bindings.LDKEvent_OpenChannelRequest_get_channel_type(ptr);
1780                 const channel_type_hu_conv: ChannelTypeFeatures = new ChannelTypeFeatures(null, channel_type);
1781                         CommonBase.add_ref_from(channel_type_hu_conv, this);
1782                 this.channel_type = channel_type_hu_conv;
1783         }
1784 }
1785 /** A Event of type HTLCHandlingFailed */
1786 export class Event_HTLCHandlingFailed extends Event {
1787         /**
1788          * The channel over which the HTLC was received.
1789          */
1790         public prev_channel_id: Uint8Array;
1791         /**
1792          * Destination of the HTLC that failed to be processed.
1793          */
1794         public failed_next_destination: HTLCDestination;
1795         /* @internal */
1796         public constructor(ptr: bigint) {
1797                 super(null, ptr);
1798                 const prev_channel_id: number = bindings.LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr);
1799                 const prev_channel_id_conv: Uint8Array = bindings.decodeUint8Array(prev_channel_id);
1800                 this.prev_channel_id = prev_channel_id_conv;
1801                 const failed_next_destination: bigint = bindings.LDKEvent_HTLCHandlingFailed_get_failed_next_destination(ptr);
1802                 const failed_next_destination_hu_conv: HTLCDestination = HTLCDestination.constr_from_ptr(failed_next_destination);
1803                         CommonBase.add_ref_from(failed_next_destination_hu_conv, this);
1804                 this.failed_next_destination = failed_next_destination_hu_conv;
1805         }
1806 }
1807 /** A Event of type BumpTransaction */
1808 export class Event_BumpTransaction extends Event {
1809         public bump_transaction: BumpTransactionEvent;
1810         /* @internal */
1811         public constructor(ptr: bigint) {
1812                 super(null, ptr);
1813                 const bump_transaction: bigint = bindings.LDKEvent_BumpTransaction_get_bump_transaction(ptr);
1814                 const bump_transaction_hu_conv: BumpTransactionEvent = BumpTransactionEvent.constr_from_ptr(bump_transaction);
1815                         CommonBase.add_ref_from(bump_transaction_hu_conv, this);
1816                 this.bump_transaction = bump_transaction_hu_conv;
1817         }
1818 }