[TS] Update auto-generated bindings
[ldk-java] / ts / structs / ChannelMessageHandler.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 { Event } from '../structs/Event.mjs';
443 import { Option_EventZ } from '../structs/Option_EventZ.mjs';
444 import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
445 import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs';
446 import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs';
447 import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
448 import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs';
449 import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs';
450 import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs';
451 import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs';
452 import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs';
453 import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs';
454 import { PayeePubKey } from '../structs/PayeePubKey.mjs';
455 import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs';
456 import { PrivateRoute } from '../structs/PrivateRoute.mjs';
457 import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
458 import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
459 import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs';
460 import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs';
461 import { Description } from '../structs/Description.mjs';
462 import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
463 import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
464 import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
465 import { BigSize } from '../structs/BigSize.mjs';
466 import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs';
467 import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs';
468 import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs';
469 import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs';
470 import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs';
471 import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs';
472 import { TwoTuple__u832u16Z } from '../structs/TwoTuple__u832u16Z.mjs';
473 import { PaymentRelay } from '../structs/PaymentRelay.mjs';
474 import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs';
475 import { PaymentConstraints } from '../structs/PaymentConstraints.mjs';
476 import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs';
477 import { ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ } from '../structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.mjs';
478 import { Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ } from '../structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.mjs';
479 import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs';
480 import { ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ } from '../structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.mjs';
481 import { SendError } from '../structs/SendError.mjs';
482 import { Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ } from '../structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.mjs';
483 import { ParsedOnionMessageContents } from '../structs/ParsedOnionMessageContents.mjs';
484 import { PeeledOnion } from '../structs/PeeledOnion.mjs';
485 import { Result_PeeledOnionNoneZ } from '../structs/Result_PeeledOnionNoneZ.mjs';
486 import { SendSuccess } from '../structs/SendSuccess.mjs';
487 import { Result_SendSuccessSendErrorZ } from '../structs/Result_SendSuccessSendErrorZ.mjs';
488 import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs';
489 import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs';
490 import { ForwardNode } from '../structs/ForwardNode.mjs';
491 import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs';
492 import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
493 import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs';
494 import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs';
495 import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs';
496 import { DelayedPaymentKey } from '../structs/DelayedPaymentKey.mjs';
497 import { Result_DelayedPaymentKeyDecodeErrorZ } from '../structs/Result_DelayedPaymentKeyDecodeErrorZ.mjs';
498 import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs';
499 import { Result_HtlcBasepointDecodeErrorZ } from '../structs/Result_HtlcBasepointDecodeErrorZ.mjs';
500 import { HtlcKey } from '../structs/HtlcKey.mjs';
501 import { Result_HtlcKeyDecodeErrorZ } from '../structs/Result_HtlcKeyDecodeErrorZ.mjs';
502 import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs';
503 import { Result_RevocationBasepointDecodeErrorZ } from '../structs/Result_RevocationBasepointDecodeErrorZ.mjs';
504 import { RevocationKey } from '../structs/RevocationKey.mjs';
505 import { Result_RevocationKeyDecodeErrorZ } from '../structs/Result_RevocationKeyDecodeErrorZ.mjs';
506 import { WatchedOutput } from '../structs/WatchedOutput.mjs';
507 import { Filter, FilterInterface } from '../structs/Filter.mjs';
508 import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
509 import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
510 import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
511 import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
512 import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs';
513 import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs';
514 import { FirstHopCandidate } from '../structs/FirstHopCandidate.mjs';
515 import { PublicHopCandidate } from '../structs/PublicHopCandidate.mjs';
516 import { PrivateHopCandidate } from '../structs/PrivateHopCandidate.mjs';
517 import { BlindedPathCandidate } from '../structs/BlindedPathCandidate.mjs';
518 import { OneHopBlindedPathCandidate } from '../structs/OneHopBlindedPathCandidate.mjs';
519 import { CandidateRouteHop } from '../structs/CandidateRouteHop.mjs';
520 import { ChannelUsage } from '../structs/ChannelUsage.mjs';
521 import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs';
522 import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs';
523 import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs';
524 import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
525 import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
526 import { Persister, PersisterInterface } from '../structs/Persister.mjs';
527 import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs';
528 import { Persist, PersistInterface } from '../structs/Persist.mjs';
529 import { PrintableString } from '../structs/PrintableString.mjs';
530 import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
531 import { Future } from '../structs/Future.mjs';
532 import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
533 import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
534 import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs';
535 import { UserConfig } from '../structs/UserConfig.mjs';
536 import { BestBlock } from '../structs/BestBlock.mjs';
537 import { Listen, ListenInterface } from '../structs/Listen.mjs';
538 import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
539 import { ChainMonitor } from '../structs/ChainMonitor.mjs';
540 import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
541 import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
542 import { FailureCode } from '../structs/FailureCode.mjs';
543 import { ChainParameters } from '../structs/ChainParameters.mjs';
544 import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.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
596 import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
597 import * as bindings from '../bindings.mjs'
598
599
600
601 /** An implementation of ChannelMessageHandler */
602 export interface ChannelMessageHandlerInterface {
603         /**Handle an incoming `open_channel` message from the given peer.
604          */
605         handle_open_channel(their_node_id: Uint8Array, msg: OpenChannel): void;
606         /**Handle an incoming `open_channel2` message from the given peer.
607          */
608         handle_open_channel_v2(their_node_id: Uint8Array, msg: OpenChannelV2): void;
609         /**Handle an incoming `accept_channel` message from the given peer.
610          */
611         handle_accept_channel(their_node_id: Uint8Array, msg: AcceptChannel): void;
612         /**Handle an incoming `accept_channel2` message from the given peer.
613          */
614         handle_accept_channel_v2(their_node_id: Uint8Array, msg: AcceptChannelV2): void;
615         /**Handle an incoming `funding_created` message from the given peer.
616          */
617         handle_funding_created(their_node_id: Uint8Array, msg: FundingCreated): void;
618         /**Handle an incoming `funding_signed` message from the given peer.
619          */
620         handle_funding_signed(their_node_id: Uint8Array, msg: FundingSigned): void;
621         /**Handle an incoming `channel_ready` message from the given peer.
622          */
623         handle_channel_ready(their_node_id: Uint8Array, msg: ChannelReady): void;
624         /**Handle an incoming `shutdown` message from the given peer.
625          */
626         handle_shutdown(their_node_id: Uint8Array, msg: Shutdown): void;
627         /**Handle an incoming `closing_signed` message from the given peer.
628          */
629         handle_closing_signed(their_node_id: Uint8Array, msg: ClosingSigned): void;
630         /**Handle an incoming `stfu` message from the given peer.
631          */
632         handle_stfu(their_node_id: Uint8Array, msg: Stfu): void;
633         /**Handle an incoming `splice` message from the given peer.
634          */
635         handle_splice(their_node_id: Uint8Array, msg: Splice): void;
636         /**Handle an incoming `splice_ack` message from the given peer.
637          */
638         handle_splice_ack(their_node_id: Uint8Array, msg: SpliceAck): void;
639         /**Handle an incoming `splice_locked` message from the given peer.
640          */
641         handle_splice_locked(their_node_id: Uint8Array, msg: SpliceLocked): void;
642         /**Handle an incoming `tx_add_input message` from the given peer.
643          */
644         handle_tx_add_input(their_node_id: Uint8Array, msg: TxAddInput): void;
645         /**Handle an incoming `tx_add_output` message from the given peer.
646          */
647         handle_tx_add_output(their_node_id: Uint8Array, msg: TxAddOutput): void;
648         /**Handle an incoming `tx_remove_input` message from the given peer.
649          */
650         handle_tx_remove_input(their_node_id: Uint8Array, msg: TxRemoveInput): void;
651         /**Handle an incoming `tx_remove_output` message from the given peer.
652          */
653         handle_tx_remove_output(their_node_id: Uint8Array, msg: TxRemoveOutput): void;
654         /**Handle an incoming `tx_complete message` from the given peer.
655          */
656         handle_tx_complete(their_node_id: Uint8Array, msg: TxComplete): void;
657         /**Handle an incoming `tx_signatures` message from the given peer.
658          */
659         handle_tx_signatures(their_node_id: Uint8Array, msg: TxSignatures): void;
660         /**Handle an incoming `tx_init_rbf` message from the given peer.
661          */
662         handle_tx_init_rbf(their_node_id: Uint8Array, msg: TxInitRbf): void;
663         /**Handle an incoming `tx_ack_rbf` message from the given peer.
664          */
665         handle_tx_ack_rbf(their_node_id: Uint8Array, msg: TxAckRbf): void;
666         /**Handle an incoming `tx_abort message` from the given peer.
667          */
668         handle_tx_abort(their_node_id: Uint8Array, msg: TxAbort): void;
669         /**Handle an incoming `update_add_htlc` message from the given peer.
670          */
671         handle_update_add_htlc(their_node_id: Uint8Array, msg: UpdateAddHTLC): void;
672         /**Handle an incoming `update_fulfill_htlc` message from the given peer.
673          */
674         handle_update_fulfill_htlc(their_node_id: Uint8Array, msg: UpdateFulfillHTLC): void;
675         /**Handle an incoming `update_fail_htlc` message from the given peer.
676          */
677         handle_update_fail_htlc(their_node_id: Uint8Array, msg: UpdateFailHTLC): void;
678         /**Handle an incoming `update_fail_malformed_htlc` message from the given peer.
679          */
680         handle_update_fail_malformed_htlc(their_node_id: Uint8Array, msg: UpdateFailMalformedHTLC): void;
681         /**Handle an incoming `commitment_signed` message from the given peer.
682          */
683         handle_commitment_signed(their_node_id: Uint8Array, msg: CommitmentSigned): void;
684         /**Handle an incoming `revoke_and_ack` message from the given peer.
685          */
686         handle_revoke_and_ack(their_node_id: Uint8Array, msg: RevokeAndACK): void;
687         /**Handle an incoming `update_fee` message from the given peer.
688          */
689         handle_update_fee(their_node_id: Uint8Array, msg: UpdateFee): void;
690         /**Handle an incoming `announcement_signatures` message from the given peer.
691          */
692         handle_announcement_signatures(their_node_id: Uint8Array, msg: AnnouncementSignatures): void;
693         /**Indicates a connection to the peer failed/an existing connection was lost.
694          */
695         peer_disconnected(their_node_id: Uint8Array): void;
696         /**Handle a peer reconnecting, possibly generating `channel_reestablish` message(s).
697          * 
698          * May return an `Err(())` if the features the peer supports are not sufficient to communicate
699          * with us. Implementors should be somewhat conservative about doing so, however, as other
700          * message handlers may still wish to communicate with this peer.
701          */
702         peer_connected(their_node_id: Uint8Array, msg: Init, inbound: boolean): Result_NoneNoneZ;
703         /**Handle an incoming `channel_reestablish` message from the given peer.
704          */
705         handle_channel_reestablish(their_node_id: Uint8Array, msg: ChannelReestablish): void;
706         /**Handle an incoming `channel_update` message from the given peer.
707          */
708         handle_channel_update(their_node_id: Uint8Array, msg: ChannelUpdate): void;
709         /**Handle an incoming `error` message from the given peer.
710          */
711         handle_error(their_node_id: Uint8Array, msg: ErrorMessage): void;
712         /**Gets the node feature flags which this handler itself supports. All available handlers are
713          * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
714          * which are broadcasted in our [`NodeAnnouncement`] message.
715          */
716         provided_node_features(): NodeFeatures;
717         /**Gets the init feature flags which should be sent to the given peer. All available handlers
718          * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
719          * which are sent in our [`Init`] message.
720          * 
721          * Note that this method is called before [`Self::peer_connected`].
722          */
723         provided_init_features(their_node_id: Uint8Array): InitFeatures;
724         /**Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
725          * 
726          * If it's `None`, then no particular network chain hash compatibility will be enforced when
727          * connecting to peers.
728          */
729         get_chain_hashes(): Option_CVec_ThirtyTwoBytesZZ;
730 }
731
732 class LDKChannelMessageHandlerHolder {
733         held: ChannelMessageHandler|null = null;
734 }
735
736 /**
737  * A trait to describe an object which can receive channel messages.
738  * 
739  * Messages MAY be called in parallel when they originate from different `their_node_ids`, however
740  * they MUST NOT be called in parallel when the two calls have the same `their_node_id`.
741  */
742 export class ChannelMessageHandler extends CommonBase {
743         /* @internal */
744         public bindings_instance: bindings.LDKChannelMessageHandler|null;
745
746         /* @internal */
747         public instance_idx?: number;
748
749         /* @internal */
750         constructor(_dummy: null, ptr: bigint) {
751                 super(ptr, bindings.ChannelMessageHandler_free);
752                 this.bindings_instance = null;
753         }
754
755         /** Creates a new instance of ChannelMessageHandler from a given implementation */
756         public static new_impl(arg: ChannelMessageHandlerInterface, messageSendEventsProvider_impl: MessageSendEventsProviderInterface): ChannelMessageHandler {
757                 const impl_holder: LDKChannelMessageHandlerHolder = new LDKChannelMessageHandlerHolder();
758                 let structImplementation = {
759                         handle_open_channel (their_node_id: number, msg: bigint): void {
760                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
761                                 const msg_hu_conv: OpenChannel = new OpenChannel(null, msg);
762                                 arg.handle_open_channel(their_node_id_conv, msg_hu_conv);
763                         },
764                         handle_open_channel_v2 (their_node_id: number, msg: bigint): void {
765                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
766                                 const msg_hu_conv: OpenChannelV2 = new OpenChannelV2(null, msg);
767                                 arg.handle_open_channel_v2(their_node_id_conv, msg_hu_conv);
768                         },
769                         handle_accept_channel (their_node_id: number, msg: bigint): void {
770                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
771                                 const msg_hu_conv: AcceptChannel = new AcceptChannel(null, msg);
772                                 arg.handle_accept_channel(their_node_id_conv, msg_hu_conv);
773                         },
774                         handle_accept_channel_v2 (their_node_id: number, msg: bigint): void {
775                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
776                                 const msg_hu_conv: AcceptChannelV2 = new AcceptChannelV2(null, msg);
777                                 arg.handle_accept_channel_v2(their_node_id_conv, msg_hu_conv);
778                         },
779                         handle_funding_created (their_node_id: number, msg: bigint): void {
780                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
781                                 const msg_hu_conv: FundingCreated = new FundingCreated(null, msg);
782                                 arg.handle_funding_created(their_node_id_conv, msg_hu_conv);
783                         },
784                         handle_funding_signed (their_node_id: number, msg: bigint): void {
785                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
786                                 const msg_hu_conv: FundingSigned = new FundingSigned(null, msg);
787                                 arg.handle_funding_signed(their_node_id_conv, msg_hu_conv);
788                         },
789                         handle_channel_ready (their_node_id: number, msg: bigint): void {
790                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
791                                 const msg_hu_conv: ChannelReady = new ChannelReady(null, msg);
792                                 arg.handle_channel_ready(their_node_id_conv, msg_hu_conv);
793                         },
794                         handle_shutdown (their_node_id: number, msg: bigint): void {
795                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
796                                 const msg_hu_conv: Shutdown = new Shutdown(null, msg);
797                                 arg.handle_shutdown(their_node_id_conv, msg_hu_conv);
798                         },
799                         handle_closing_signed (their_node_id: number, msg: bigint): void {
800                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
801                                 const msg_hu_conv: ClosingSigned = new ClosingSigned(null, msg);
802                                 arg.handle_closing_signed(their_node_id_conv, msg_hu_conv);
803                         },
804                         handle_stfu (their_node_id: number, msg: bigint): void {
805                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
806                                 const msg_hu_conv: Stfu = new Stfu(null, msg);
807                                 arg.handle_stfu(their_node_id_conv, msg_hu_conv);
808                         },
809                         handle_splice (their_node_id: number, msg: bigint): void {
810                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
811                                 const msg_hu_conv: Splice = new Splice(null, msg);
812                                 arg.handle_splice(their_node_id_conv, msg_hu_conv);
813                         },
814                         handle_splice_ack (their_node_id: number, msg: bigint): void {
815                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
816                                 const msg_hu_conv: SpliceAck = new SpliceAck(null, msg);
817                                 arg.handle_splice_ack(their_node_id_conv, msg_hu_conv);
818                         },
819                         handle_splice_locked (their_node_id: number, msg: bigint): void {
820                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
821                                 const msg_hu_conv: SpliceLocked = new SpliceLocked(null, msg);
822                                 arg.handle_splice_locked(their_node_id_conv, msg_hu_conv);
823                         },
824                         handle_tx_add_input (their_node_id: number, msg: bigint): void {
825                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
826                                 const msg_hu_conv: TxAddInput = new TxAddInput(null, msg);
827                                 arg.handle_tx_add_input(their_node_id_conv, msg_hu_conv);
828                         },
829                         handle_tx_add_output (their_node_id: number, msg: bigint): void {
830                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
831                                 const msg_hu_conv: TxAddOutput = new TxAddOutput(null, msg);
832                                 arg.handle_tx_add_output(their_node_id_conv, msg_hu_conv);
833                         },
834                         handle_tx_remove_input (their_node_id: number, msg: bigint): void {
835                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
836                                 const msg_hu_conv: TxRemoveInput = new TxRemoveInput(null, msg);
837                                 arg.handle_tx_remove_input(their_node_id_conv, msg_hu_conv);
838                         },
839                         handle_tx_remove_output (their_node_id: number, msg: bigint): void {
840                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
841                                 const msg_hu_conv: TxRemoveOutput = new TxRemoveOutput(null, msg);
842                                 arg.handle_tx_remove_output(their_node_id_conv, msg_hu_conv);
843                         },
844                         handle_tx_complete (their_node_id: number, msg: bigint): void {
845                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
846                                 const msg_hu_conv: TxComplete = new TxComplete(null, msg);
847                                 arg.handle_tx_complete(their_node_id_conv, msg_hu_conv);
848                         },
849                         handle_tx_signatures (their_node_id: number, msg: bigint): void {
850                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
851                                 const msg_hu_conv: TxSignatures = new TxSignatures(null, msg);
852                                 arg.handle_tx_signatures(their_node_id_conv, msg_hu_conv);
853                         },
854                         handle_tx_init_rbf (their_node_id: number, msg: bigint): void {
855                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
856                                 const msg_hu_conv: TxInitRbf = new TxInitRbf(null, msg);
857                                 arg.handle_tx_init_rbf(their_node_id_conv, msg_hu_conv);
858                         },
859                         handle_tx_ack_rbf (their_node_id: number, msg: bigint): void {
860                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
861                                 const msg_hu_conv: TxAckRbf = new TxAckRbf(null, msg);
862                                 arg.handle_tx_ack_rbf(their_node_id_conv, msg_hu_conv);
863                         },
864                         handle_tx_abort (their_node_id: number, msg: bigint): void {
865                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
866                                 const msg_hu_conv: TxAbort = new TxAbort(null, msg);
867                                 arg.handle_tx_abort(their_node_id_conv, msg_hu_conv);
868                         },
869                         handle_update_add_htlc (their_node_id: number, msg: bigint): void {
870                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
871                                 const msg_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, msg);
872                                 arg.handle_update_add_htlc(their_node_id_conv, msg_hu_conv);
873                         },
874                         handle_update_fulfill_htlc (their_node_id: number, msg: bigint): void {
875                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
876                                 const msg_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, msg);
877                                 arg.handle_update_fulfill_htlc(their_node_id_conv, msg_hu_conv);
878                         },
879                         handle_update_fail_htlc (their_node_id: number, msg: bigint): void {
880                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
881                                 const msg_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, msg);
882                                 arg.handle_update_fail_htlc(their_node_id_conv, msg_hu_conv);
883                         },
884                         handle_update_fail_malformed_htlc (their_node_id: number, msg: bigint): void {
885                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
886                                 const msg_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, msg);
887                                 arg.handle_update_fail_malformed_htlc(their_node_id_conv, msg_hu_conv);
888                         },
889                         handle_commitment_signed (their_node_id: number, msg: bigint): void {
890                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
891                                 const msg_hu_conv: CommitmentSigned = new CommitmentSigned(null, msg);
892                                 arg.handle_commitment_signed(their_node_id_conv, msg_hu_conv);
893                         },
894                         handle_revoke_and_ack (their_node_id: number, msg: bigint): void {
895                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
896                                 const msg_hu_conv: RevokeAndACK = new RevokeAndACK(null, msg);
897                                 arg.handle_revoke_and_ack(their_node_id_conv, msg_hu_conv);
898                         },
899                         handle_update_fee (their_node_id: number, msg: bigint): void {
900                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
901                                 const msg_hu_conv: UpdateFee = new UpdateFee(null, msg);
902                                 arg.handle_update_fee(their_node_id_conv, msg_hu_conv);
903                         },
904                         handle_announcement_signatures (their_node_id: number, msg: bigint): void {
905                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
906                                 const msg_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, msg);
907                                 arg.handle_announcement_signatures(their_node_id_conv, msg_hu_conv);
908                         },
909                         peer_disconnected (their_node_id: number): void {
910                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
911                                 arg.peer_disconnected(their_node_id_conv);
912                         },
913                         peer_connected (their_node_id: number, msg: bigint, inbound: boolean): bigint {
914                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
915                                 const msg_hu_conv: Init = new Init(null, msg);
916                                 const ret: Result_NoneNoneZ = arg.peer_connected(their_node_id_conv, msg_hu_conv, inbound);
917                                 const result: bigint = ret == null ? 0n : ret.clone_ptr();
918                                 return result;
919                         },
920                         handle_channel_reestablish (their_node_id: number, msg: bigint): void {
921                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
922                                 const msg_hu_conv: ChannelReestablish = new ChannelReestablish(null, msg);
923                                 arg.handle_channel_reestablish(their_node_id_conv, msg_hu_conv);
924                         },
925                         handle_channel_update (their_node_id: number, msg: bigint): void {
926                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
927                                 const msg_hu_conv: ChannelUpdate = new ChannelUpdate(null, msg);
928                                 arg.handle_channel_update(their_node_id_conv, msg_hu_conv);
929                         },
930                         handle_error (their_node_id: number, msg: bigint): void {
931                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
932                                 const msg_hu_conv: ErrorMessage = new ErrorMessage(null, msg);
933                                 arg.handle_error(their_node_id_conv, msg_hu_conv);
934                         },
935                         provided_node_features (): bigint {
936                                 const ret: NodeFeatures = arg.provided_node_features();
937                                 const result: bigint = ret == null ? 0n : ret.clone_ptr();
938                                 return result;
939                         },
940                         provided_init_features (their_node_id: number): bigint {
941                                 const their_node_id_conv: Uint8Array = bindings.decodeUint8Array(their_node_id);
942                                 const ret: InitFeatures = arg.provided_init_features(their_node_id_conv);
943                                 const result: bigint = ret == null ? 0n : ret.clone_ptr();
944                                 return result;
945                         },
946                         get_chain_hashes (): bigint {
947                                 const ret: Option_CVec_ThirtyTwoBytesZZ = arg.get_chain_hashes();
948                                 const result: bigint = ret == null ? 0n : ret.clone_ptr();
949                                 CommonBase.add_ref_from(impl_holder.held, ret);
950                                 return result;
951                         },
952                 } as bindings.LDKChannelMessageHandler;
953                 const messageSendEventsProvider = MessageSendEventsProvider.new_impl(messageSendEventsProvider_impl);
954                 const ptr_idx: [bigint, number] = bindings.LDKChannelMessageHandler_new(structImplementation, messageSendEventsProvider.instance_idx!);
955
956                 impl_holder.held = new ChannelMessageHandler(null, ptr_idx[0]);
957                 impl_holder.held.instance_idx = ptr_idx[1];
958                 impl_holder.held.bindings_instance = structImplementation;
959                 impl_holder.held.ptrs_to.push(messageSendEventsProvider);
960                 return impl_holder.held!;
961         }
962
963         /**
964          * Handle an incoming `open_channel` message from the given peer.
965          */
966         public handle_open_channel(their_node_id: Uint8Array, msg: OpenChannel): void {
967                 bindings.ChannelMessageHandler_handle_open_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
968                 CommonBase.add_ref_from(this, msg);
969         }
970
971         /**
972          * Handle an incoming `open_channel2` message from the given peer.
973          */
974         public handle_open_channel_v2(their_node_id: Uint8Array, msg: OpenChannelV2): void {
975                 bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
976                 CommonBase.add_ref_from(this, msg);
977         }
978
979         /**
980          * Handle an incoming `accept_channel` message from the given peer.
981          */
982         public handle_accept_channel(their_node_id: Uint8Array, msg: AcceptChannel): void {
983                 bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
984                 CommonBase.add_ref_from(this, msg);
985         }
986
987         /**
988          * Handle an incoming `accept_channel2` message from the given peer.
989          */
990         public handle_accept_channel_v2(their_node_id: Uint8Array, msg: AcceptChannelV2): void {
991                 bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
992                 CommonBase.add_ref_from(this, msg);
993         }
994
995         /**
996          * Handle an incoming `funding_created` message from the given peer.
997          */
998         public handle_funding_created(their_node_id: Uint8Array, msg: FundingCreated): void {
999                 bindings.ChannelMessageHandler_handle_funding_created(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1000                 CommonBase.add_ref_from(this, msg);
1001         }
1002
1003         /**
1004          * Handle an incoming `funding_signed` message from the given peer.
1005          */
1006         public handle_funding_signed(their_node_id: Uint8Array, msg: FundingSigned): void {
1007                 bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1008                 CommonBase.add_ref_from(this, msg);
1009         }
1010
1011         /**
1012          * Handle an incoming `channel_ready` message from the given peer.
1013          */
1014         public handle_channel_ready(their_node_id: Uint8Array, msg: ChannelReady): void {
1015                 bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1016                 CommonBase.add_ref_from(this, msg);
1017         }
1018
1019         /**
1020          * Handle an incoming `shutdown` message from the given peer.
1021          */
1022         public handle_shutdown(their_node_id: Uint8Array, msg: Shutdown): void {
1023                 bindings.ChannelMessageHandler_handle_shutdown(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1024                 CommonBase.add_ref_from(this, msg);
1025         }
1026
1027         /**
1028          * Handle an incoming `closing_signed` message from the given peer.
1029          */
1030         public handle_closing_signed(their_node_id: Uint8Array, msg: ClosingSigned): void {
1031                 bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1032                 CommonBase.add_ref_from(this, msg);
1033         }
1034
1035         /**
1036          * Handle an incoming `stfu` message from the given peer.
1037          */
1038         public handle_stfu(their_node_id: Uint8Array, msg: Stfu): void {
1039                 bindings.ChannelMessageHandler_handle_stfu(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1040                 CommonBase.add_ref_from(this, msg);
1041         }
1042
1043         /**
1044          * Handle an incoming `splice` message from the given peer.
1045          */
1046         public handle_splice(their_node_id: Uint8Array, msg: Splice): void {
1047                 bindings.ChannelMessageHandler_handle_splice(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1048                 CommonBase.add_ref_from(this, msg);
1049         }
1050
1051         /**
1052          * Handle an incoming `splice_ack` message from the given peer.
1053          */
1054         public handle_splice_ack(their_node_id: Uint8Array, msg: SpliceAck): void {
1055                 bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1056                 CommonBase.add_ref_from(this, msg);
1057         }
1058
1059         /**
1060          * Handle an incoming `splice_locked` message from the given peer.
1061          */
1062         public handle_splice_locked(their_node_id: Uint8Array, msg: SpliceLocked): void {
1063                 bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1064                 CommonBase.add_ref_from(this, msg);
1065         }
1066
1067         /**
1068          * Handle an incoming `tx_add_input message` from the given peer.
1069          */
1070         public handle_tx_add_input(their_node_id: Uint8Array, msg: TxAddInput): void {
1071                 bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1072                 CommonBase.add_ref_from(this, msg);
1073         }
1074
1075         /**
1076          * Handle an incoming `tx_add_output` message from the given peer.
1077          */
1078         public handle_tx_add_output(their_node_id: Uint8Array, msg: TxAddOutput): void {
1079                 bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1080                 CommonBase.add_ref_from(this, msg);
1081         }
1082
1083         /**
1084          * Handle an incoming `tx_remove_input` message from the given peer.
1085          */
1086         public handle_tx_remove_input(their_node_id: Uint8Array, msg: TxRemoveInput): void {
1087                 bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1088                 CommonBase.add_ref_from(this, msg);
1089         }
1090
1091         /**
1092          * Handle an incoming `tx_remove_output` message from the given peer.
1093          */
1094         public handle_tx_remove_output(their_node_id: Uint8Array, msg: TxRemoveOutput): void {
1095                 bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1096                 CommonBase.add_ref_from(this, msg);
1097         }
1098
1099         /**
1100          * Handle an incoming `tx_complete message` from the given peer.
1101          */
1102         public handle_tx_complete(their_node_id: Uint8Array, msg: TxComplete): void {
1103                 bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1104                 CommonBase.add_ref_from(this, msg);
1105         }
1106
1107         /**
1108          * Handle an incoming `tx_signatures` message from the given peer.
1109          */
1110         public handle_tx_signatures(their_node_id: Uint8Array, msg: TxSignatures): void {
1111                 bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1112                 CommonBase.add_ref_from(this, msg);
1113         }
1114
1115         /**
1116          * Handle an incoming `tx_init_rbf` message from the given peer.
1117          */
1118         public handle_tx_init_rbf(their_node_id: Uint8Array, msg: TxInitRbf): void {
1119                 bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1120                 CommonBase.add_ref_from(this, msg);
1121         }
1122
1123         /**
1124          * Handle an incoming `tx_ack_rbf` message from the given peer.
1125          */
1126         public handle_tx_ack_rbf(their_node_id: Uint8Array, msg: TxAckRbf): void {
1127                 bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1128                 CommonBase.add_ref_from(this, msg);
1129         }
1130
1131         /**
1132          * Handle an incoming `tx_abort message` from the given peer.
1133          */
1134         public handle_tx_abort(their_node_id: Uint8Array, msg: TxAbort): void {
1135                 bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1136                 CommonBase.add_ref_from(this, msg);
1137         }
1138
1139         /**
1140          * Handle an incoming `update_add_htlc` message from the given peer.
1141          */
1142         public handle_update_add_htlc(their_node_id: Uint8Array, msg: UpdateAddHTLC): void {
1143                 bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1144                 CommonBase.add_ref_from(this, msg);
1145         }
1146
1147         /**
1148          * Handle an incoming `update_fulfill_htlc` message from the given peer.
1149          */
1150         public handle_update_fulfill_htlc(their_node_id: Uint8Array, msg: UpdateFulfillHTLC): void {
1151                 bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1152                 CommonBase.add_ref_from(this, msg);
1153         }
1154
1155         /**
1156          * Handle an incoming `update_fail_htlc` message from the given peer.
1157          */
1158         public handle_update_fail_htlc(their_node_id: Uint8Array, msg: UpdateFailHTLC): void {
1159                 bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1160                 CommonBase.add_ref_from(this, msg);
1161         }
1162
1163         /**
1164          * Handle an incoming `update_fail_malformed_htlc` message from the given peer.
1165          */
1166         public handle_update_fail_malformed_htlc(their_node_id: Uint8Array, msg: UpdateFailMalformedHTLC): void {
1167                 bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1168                 CommonBase.add_ref_from(this, msg);
1169         }
1170
1171         /**
1172          * Handle an incoming `commitment_signed` message from the given peer.
1173          */
1174         public handle_commitment_signed(their_node_id: Uint8Array, msg: CommitmentSigned): void {
1175                 bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1176                 CommonBase.add_ref_from(this, msg);
1177         }
1178
1179         /**
1180          * Handle an incoming `revoke_and_ack` message from the given peer.
1181          */
1182         public handle_revoke_and_ack(their_node_id: Uint8Array, msg: RevokeAndACK): void {
1183                 bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1184                 CommonBase.add_ref_from(this, msg);
1185         }
1186
1187         /**
1188          * Handle an incoming `update_fee` message from the given peer.
1189          */
1190         public handle_update_fee(their_node_id: Uint8Array, msg: UpdateFee): void {
1191                 bindings.ChannelMessageHandler_handle_update_fee(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1192                 CommonBase.add_ref_from(this, msg);
1193         }
1194
1195         /**
1196          * Handle an incoming `announcement_signatures` message from the given peer.
1197          */
1198         public handle_announcement_signatures(their_node_id: Uint8Array, msg: AnnouncementSignatures): void {
1199                 bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1200                 CommonBase.add_ref_from(this, msg);
1201         }
1202
1203         /**
1204          * Indicates a connection to the peer failed/an existing connection was lost.
1205          */
1206         public peer_disconnected(their_node_id: Uint8Array): void {
1207                 bindings.ChannelMessageHandler_peer_disconnected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)));
1208         }
1209
1210         /**
1211          * Handle a peer reconnecting, possibly generating `channel_reestablish` message(s).
1212          * 
1213          * May return an `Err(())` if the features the peer supports are not sufficient to communicate
1214          * with us. Implementors should be somewhat conservative about doing so, however, as other
1215          * message handlers may still wish to communicate with this peer.
1216          */
1217         public peer_connected(their_node_id: Uint8Array, msg: Init, inbound: boolean): Result_NoneNoneZ {
1218                 const ret: bigint = bindings.ChannelMessageHandler_peer_connected(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg), inbound);
1219                 const ret_hu_conv: Result_NoneNoneZ = Result_NoneNoneZ.constr_from_ptr(ret);
1220                 CommonBase.add_ref_from(this, msg);
1221                 return ret_hu_conv;
1222         }
1223
1224         /**
1225          * Handle an incoming `channel_reestablish` message from the given peer.
1226          */
1227         public handle_channel_reestablish(their_node_id: Uint8Array, msg: ChannelReestablish): void {
1228                 bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1229                 CommonBase.add_ref_from(this, msg);
1230         }
1231
1232         /**
1233          * Handle an incoming `channel_update` message from the given peer.
1234          */
1235         public handle_channel_update(their_node_id: Uint8Array, msg: ChannelUpdate): void {
1236                 bindings.ChannelMessageHandler_handle_channel_update(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1237                 CommonBase.add_ref_from(this, msg);
1238         }
1239
1240         /**
1241          * Handle an incoming `error` message from the given peer.
1242          */
1243         public handle_error(their_node_id: Uint8Array, msg: ErrorMessage): void {
1244                 bindings.ChannelMessageHandler_handle_error(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)), msg == null ? 0n : CommonBase.get_ptr_of(msg));
1245                 CommonBase.add_ref_from(this, msg);
1246         }
1247
1248         /**
1249          * Gets the node feature flags which this handler itself supports. All available handlers are
1250          * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
1251          * which are broadcasted in our [`NodeAnnouncement`] message.
1252          */
1253         public provided_node_features(): NodeFeatures {
1254                 const ret: bigint = bindings.ChannelMessageHandler_provided_node_features(this.ptr);
1255                 const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
1256                 CommonBase.add_ref_from(ret_hu_conv, this);
1257                 return ret_hu_conv;
1258         }
1259
1260         /**
1261          * Gets the init feature flags which should be sent to the given peer. All available handlers
1262          * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
1263          * which are sent in our [`Init`] message.
1264          * 
1265          * Note that this method is called before [`Self::peer_connected`].
1266          */
1267         public provided_init_features(their_node_id: Uint8Array): InitFeatures {
1268                 const ret: bigint = bindings.ChannelMessageHandler_provided_init_features(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(their_node_id, 33)));
1269                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
1270                 CommonBase.add_ref_from(ret_hu_conv, this);
1271                 return ret_hu_conv;
1272         }
1273
1274         /**
1275          * Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
1276          * 
1277          * If it's `None`, then no particular network chain hash compatibility will be enforced when
1278          * connecting to peers.
1279          */
1280         public get_chain_hashes(): Option_CVec_ThirtyTwoBytesZZ {
1281                 const ret: bigint = bindings.ChannelMessageHandler_get_chain_hashes(this.ptr);
1282                 const ret_hu_conv: Option_CVec_ThirtyTwoBytesZZ = Option_CVec_ThirtyTwoBytesZZ.constr_from_ptr(ret);
1283                 CommonBase.add_ref_from(ret_hu_conv, this);
1284                 return ret_hu_conv;
1285         }
1286
1287 }