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