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