[TS] Update auto-generated bindings
[ldk-java] / ts / structs / UtilMethods.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 { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
546 import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs';
547 import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
548 import { ExpandedKey } from '../structs/ExpandedKey.mjs';
549 import { Packet } from '../structs/Packet.mjs';
550 import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
551 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
552 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
553 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
554 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
555 import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
556 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
557 import { MessageHandler } from '../structs/MessageHandler.mjs';
558 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
559 import { PeerManager } from '../structs/PeerManager.mjs';
560 import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
561 import { OfferFeatures } from '../structs/OfferFeatures.mjs';
562 import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs';
563 import { Amount } from '../structs/Amount.mjs';
564 import { Quantity } from '../structs/Quantity.mjs';
565 import { TaggedHash } from '../structs/TaggedHash.mjs';
566 import { ErroneousField } from '../structs/ErroneousField.mjs';
567 import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
568 import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
569 import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
570 import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
571 import { DefaultRouter } from '../structs/DefaultRouter.mjs';
572 import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs';
573 import { Payee } from '../structs/Payee.mjs';
574 import { Score, ScoreInterface } from '../structs/Score.mjs';
575 import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
576 import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs';
577 import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs';
578 import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs';
579 import { KeysManager } from '../structs/KeysManager.mjs';
580 import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
581 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
582 import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs';
583 import { ForwardTlvs } from '../structs/ForwardTlvs.mjs';
584 import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs';
585 import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs';
586 import { Wallet } from '../structs/Wallet.mjs';
587 import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs';
588 import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
589 import { GossipSync } from '../structs/GossipSync.mjs';
590 import { RawDataPart } from '../structs/RawDataPart.mjs';
591 import { Sha256 } from '../structs/Sha256.mjs';
592 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
593 import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs';
594 import { Fallback } from '../structs/Fallback.mjs';
595
596 import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
597 import * as bindings from '../bindings.mjs'
598
599
600 export class UtilMethods extends CommonBase {
601         /**
602          * Gets the 128-bit integer, as 16 little-endian bytes
603          */
604         public static constructor_U128_le_bytes(val: bigint): Uint8Array {
605                 const ret: number = bindings.U128_le_bytes(bindings.encodeUint128(val));
606                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
607                 return ret_conv;
608         }
609
610         /**
611          * Constructs a new U128 from 16 little-endian bytes
612          */
613         public static constructor_U128_new(le_bytes: Uint8Array): bigint {
614                 const ret: number = bindings.U128_new(bindings.encodeUint8Array(bindings.check_arr_len(le_bytes, 16)));
615                 const ret_conv: bigint = bindings.decodeUint128(ret);
616                 return ret_conv;
617         }
618
619         /**
620          * Constructs a new COption_NoneZ containing a
621          */
622         public static constructor_COption_NoneZ_some(): COption_NoneZ {
623                 const ret: COption_NoneZ = bindings.COption_NoneZ_some();
624                 return ret;
625         }
626
627         /**
628          * Constructs a new COption_NoneZ containing nothing
629          */
630         public static constructor_COption_NoneZ_none(): COption_NoneZ {
631                 const ret: COption_NoneZ = bindings.COption_NoneZ_none();
632                 return ret;
633         }
634
635         /**
636          * Read a APIError from a byte array, created by APIError_write
637          */
638         public static constructor_APIError_read(ser: Uint8Array): Result_COption_APIErrorZDecodeErrorZ {
639                 const ret: bigint = bindings.APIError_read(bindings.encodeUint8Array(ser));
640                 const ret_hu_conv: Result_COption_APIErrorZDecodeErrorZ = Result_COption_APIErrorZDecodeErrorZ.constr_from_ptr(ret);
641                 return ret_hu_conv;
642         }
643
644         /**
645          * Creates a digital signature of a message given a SecretKey, like the node's secret.
646          * A receiver knowing the PublicKey (e.g. the node's id) and the message can be sure that the signature was generated by the caller.
647          * Signatures are EC recoverable, meaning that given the message and the signature the PublicKey of the signer can be extracted.
648          */
649         public static constructor_sign(msg: Uint8Array, sk: Uint8Array): Result_StrSecp256k1ErrorZ {
650                 const ret: bigint = bindings.sign(bindings.encodeUint8Array(msg), bindings.encodeUint8Array(bindings.check_arr_len(sk, 32)));
651                 const ret_hu_conv: Result_StrSecp256k1ErrorZ = Result_StrSecp256k1ErrorZ.constr_from_ptr(ret);
652                 return ret_hu_conv;
653         }
654
655         /**
656          * Recovers the PublicKey of the signer of the message given the message and the signature.
657          */
658         public static constructor_recover_pk(msg: Uint8Array, sig: string): Result_PublicKeySecp256k1ErrorZ {
659                 const ret: bigint = bindings.recover_pk(bindings.encodeUint8Array(msg), bindings.encodeString(sig));
660                 const ret_hu_conv: Result_PublicKeySecp256k1ErrorZ = Result_PublicKeySecp256k1ErrorZ.constr_from_ptr(ret);
661                 return ret_hu_conv;
662         }
663
664         /**
665          * Verifies a message was signed by a PrivateKey that derives to a given PublicKey, given a message, a signature,
666          * and the PublicKey.
667          */
668         public static constructor_verify(msg: Uint8Array, sig: string, pk: Uint8Array): boolean {
669                 const ret: boolean = bindings.verify(bindings.encodeUint8Array(msg), bindings.encodeString(sig), bindings.encodeUint8Array(bindings.check_arr_len(pk, 33)));
670                 return ret;
671         }
672
673         /**
674          * Construct the invoice's HRP and signatureless data into a preimage to be hashed.
675          */
676         public static constructor_construct_invoice_preimage(hrp_bytes: Uint8Array, data_without_signature: UInt5[]): Uint8Array {
677                 const ret: number = bindings.construct_invoice_preimage(bindings.encodeUint8Array(hrp_bytes), bindings.encodeUint8Array(data_without_signature != null ? bindings.uint5ArrToBytes(data_without_signature) : null));
678                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
679                 return ret_conv;
680         }
681
682         /**
683          * Read previously persisted [`ChannelMonitor`]s from the store.
684          */
685         public static constructor_read_channel_monitors(kv_store: KVStore, entropy_source: EntropySource, signer_provider: SignerProvider): Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
686                 const ret: bigint = bindings.read_channel_monitors(CommonBase.get_ptr_of(kv_store), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(signer_provider));
687                 const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret);
688                 CommonBase.add_ref_from(ret_hu_conv, kv_store);
689                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
690                 CommonBase.add_ref_from(ret_hu_conv, signer_provider);
691                 return ret_hu_conv;
692         }
693
694         /**
695          * Read a MonitorEvent from a byte array, created by MonitorEvent_write
696          */
697         public static constructor_MonitorEvent_read(ser: Uint8Array): Result_COption_MonitorEventZDecodeErrorZ {
698                 const ret: bigint = bindings.MonitorEvent_read(bindings.encodeUint8Array(ser));
699                 const ret_hu_conv: Result_COption_MonitorEventZDecodeErrorZ = Result_COption_MonitorEventZDecodeErrorZ.constr_from_ptr(ret);
700                 return ret_hu_conv;
701         }
702
703         /**
704          * Read a C2Tuple_ThirtyTwoBytesChannelMonitorZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelMonitorZ_write
705          */
706         public static constructor_C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(ser: Uint8Array, arg_a: EntropySource, arg_b: SignerProvider): Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
707                 const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(bindings.encodeUint8Array(ser), CommonBase.get_ptr_of(arg_a), CommonBase.get_ptr_of(arg_b));
708                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
709                 CommonBase.add_ref_from(ret_hu_conv, arg_a);
710                 CommonBase.add_ref_from(ret_hu_conv, arg_b);
711                 return ret_hu_conv;
712         }
713
714         /**
715          * Peel one layer off an incoming onion, returning a [`PendingHTLCInfo`] that contains information
716          * about the intended next-hop for the HTLC.
717          * 
718          * This does all the relevant context-free checks that LDK requires for payment relay or
719          * acceptance. If the payment is to be received, and the amount matches the expected amount for
720          * a given invoice, this indicates the [`msgs::UpdateAddHTLC`], once fully committed in the
721          * channel, will generate an [`Event::PaymentClaimable`].
722          * 
723          * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
724          */
725         public static constructor_peel_payment_onion(msg: UpdateAddHTLC, node_signer: NodeSigner, logger: Logger, cur_height: number, accept_mpp_keysend: boolean, allow_skimmed_fees: boolean): Result_PendingHTLCInfoInboundHTLCErrZ {
726                 const ret: bigint = bindings.peel_payment_onion(msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), cur_height, accept_mpp_keysend, allow_skimmed_fees);
727                 const ret_hu_conv: Result_PendingHTLCInfoInboundHTLCErrZ = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
728                 CommonBase.add_ref_from(ret_hu_conv, msg);
729                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
730                 CommonBase.add_ref_from(ret_hu_conv, logger);
731                 return ret_hu_conv;
732         }
733
734         /**
735          * Fetches the set of [`InitFeatures`] flags that are provided by or required by
736          * [`ChannelManager`].
737          */
738         public static constructor_provided_init_features(config: UserConfig): InitFeatures {
739                 const ret: bigint = bindings.provided_init_features(config == null ? 0n : CommonBase.get_ptr_of(config));
740                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
741                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
742                 CommonBase.add_ref_from(ret_hu_conv, config);
743                 return ret_hu_conv;
744         }
745
746         /**
747          * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
748          */
749         public static constructor_C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser: Uint8Array, arg_entropy_source: EntropySource, arg_node_signer: NodeSigner, arg_signer_provider: SignerProvider, arg_fee_estimator: FeeEstimator, arg_chain_monitor: Watch, arg_tx_broadcaster: BroadcasterInterface, arg_router: Router, arg_logger: Logger, arg_default_config: UserConfig, arg_channel_monitors: ChannelMonitor[]): Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
750                 const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(bindings.encodeUint8Array(ser), bindings.ChannelManagerReadArgs_new(CommonBase.get_ptr_of(arg_entropy_source), CommonBase.get_ptr_of(arg_node_signer), CommonBase.get_ptr_of(arg_signer_provider), CommonBase.get_ptr_of(arg_fee_estimator), CommonBase.get_ptr_of(arg_chain_monitor), CommonBase.get_ptr_of(arg_tx_broadcaster), CommonBase.get_ptr_of(arg_router), CommonBase.get_ptr_of(arg_logger), arg_default_config == null ? 0n : CommonBase.get_ptr_of(arg_default_config), bindings.encodeUint64Array(arg_channel_monitors.map(arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16 == null ? 0n : CommonBase.get_ptr_of(arg_channel_monitors_conv_16)))));
751                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
752                 CommonBase.add_ref_from(ret_hu_conv, arg_entropy_source);
753                 CommonBase.add_ref_from(ret_hu_conv, arg_node_signer);
754                 CommonBase.add_ref_from(ret_hu_conv, arg_signer_provider);
755                 CommonBase.add_ref_from(ret_hu_conv, arg_fee_estimator);
756                 CommonBase.add_ref_from(ret_hu_conv, arg_chain_monitor);
757                 CommonBase.add_ref_from(ret_hu_conv, arg_tx_broadcaster);
758                 CommonBase.add_ref_from(ret_hu_conv, arg_router);
759                 CommonBase.add_ref_from(ret_hu_conv, arg_logger);
760                 CommonBase.add_ref_from(ret_hu_conv, arg_default_config);
761                 arg_channel_monitors.forEach((arg_channel_monitors_conv_16: ChannelMonitor) => { CommonBase.add_ref_from(ret_hu_conv, arg_channel_monitors_conv_16); });
762                 return ret_hu_conv;
763         }
764
765         /**
766          * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no
767          * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
768          * a `ChannelManager`.
769          * 
770          * `keys` is generated by calling [`NodeSigner::get_inbound_payment_key_material`] and then
771          * calling [`ExpandedKey::new`] with its result. It is recommended to cache this value and not
772          * regenerate it for each new inbound payment.
773          * 
774          * `current_time` is a Unix timestamp representing the current time.
775          * 
776          * Note that if `min_final_cltv_expiry_delta` is set to some value, then the payment will not be receivable
777          * on versions of LDK prior to 0.0.114.
778          * 
779          * [phantom node payments]: crate::sign::PhantomKeysManager
780          * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
781          */
782         public static constructor_create(keys: ExpandedKey, min_value_msat: Option_u64Z, invoice_expiry_delta_secs: number, entropy_source: EntropySource, current_time: bigint, min_final_cltv_expiry_delta: Option_u16Z): Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ {
783                 const ret: bigint = bindings.create(keys == null ? 0n : CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), invoice_expiry_delta_secs, CommonBase.get_ptr_of(entropy_source), current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta));
784                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret);
785                 CommonBase.add_ref_from(ret_hu_conv, keys);
786                 CommonBase.add_ref_from(ret_hu_conv, min_value_msat);
787                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
788                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
789                 return ret_hu_conv;
790         }
791
792         /**
793          * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash`],
794          * but no `ChannelManager` is required. Useful for generating invoices for [phantom node payments]
795          * without a `ChannelManager`.
796          * 
797          * See [`create`] for information on the `keys` and `current_time` parameters.
798          * 
799          * Note that if `min_final_cltv_expiry_delta` is set to some value, then the payment will not be receivable
800          * on versions of LDK prior to 0.0.114.
801          * 
802          * [phantom node payments]: crate::sign::PhantomKeysManager
803          */
804         public static constructor_create_from_hash(keys: ExpandedKey, min_value_msat: Option_u64Z, payment_hash: Uint8Array, invoice_expiry_delta_secs: number, current_time: bigint, min_final_cltv_expiry_delta: Option_u16Z): Result_ThirtyTwoBytesNoneZ {
805                 const ret: bigint = bindings.create_from_hash(keys == null ? 0n : CommonBase.get_ptr_of(keys), CommonBase.get_ptr_of(min_value_msat), bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), invoice_expiry_delta_secs, current_time, CommonBase.get_ptr_of(min_final_cltv_expiry_delta));
806                 const ret_hu_conv: Result_ThirtyTwoBytesNoneZ = Result_ThirtyTwoBytesNoneZ.constr_from_ptr(ret);
807                 CommonBase.add_ref_from(ret_hu_conv, keys);
808                 CommonBase.add_ref_from(ret_hu_conv, min_value_msat);
809                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
810                 return ret_hu_conv;
811         }
812
813         /**
814          * Parses an OnionV3 host and port into a [`SocketAddress::OnionV3`].
815          * 
816          * The host part must end with \".onion\".
817          */
818         public static constructor_parse_onion_address(host: string, port: number): Result_SocketAddressSocketAddressParseErrorZ {
819                 const ret: bigint = bindings.parse_onion_address(bindings.encodeString(host), port);
820                 const ret_hu_conv: Result_SocketAddressSocketAddressParseErrorZ = Result_SocketAddressSocketAddressParseErrorZ.constr_from_ptr(ret);
821                 return ret_hu_conv;
822         }
823
824         /**
825          * Gets the weight for an HTLC-Success transaction.
826          */
827         public static constructor_htlc_success_tx_weight(channel_type_features: ChannelTypeFeatures): bigint {
828                 const ret: bigint = bindings.htlc_success_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features));
829                 return ret;
830         }
831
832         /**
833          * Gets the weight for an HTLC-Timeout transaction.
834          */
835         public static constructor_htlc_timeout_tx_weight(channel_type_features: ChannelTypeFeatures): bigint {
836                 const ret: bigint = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features));
837                 return ret;
838         }
839
840         /**
841          * Check if a given input witness attempts to claim a HTLC.
842          */
843         public static constructor_HTLCClaim_from_witness(witness: Uint8Array): Option_HTLCClaimZ {
844                 const ret: bigint = bindings.HTLCClaim_from_witness(bindings.encodeUint8Array(witness));
845                 const ret_hu_conv: Option_HTLCClaimZ = Option_HTLCClaimZ.constr_from_ptr(ret);
846                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
847                 return ret_hu_conv;
848         }
849
850         /**
851          * Build the commitment secret from the seed and the commitment number
852          */
853         public static constructor_build_commitment_secret(commitment_seed: Uint8Array, idx: bigint): Uint8Array {
854                 const ret: number = bindings.build_commitment_secret(bindings.encodeUint8Array(bindings.check_arr_len(commitment_seed, 32)), idx);
855                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
856                 return ret_conv;
857         }
858
859         /**
860          * Build a closing transaction
861          */
862         public static constructor_build_closing_transaction(to_holder_value_sat: bigint, to_counterparty_value_sat: bigint, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: OutPoint): Uint8Array {
863                 const ret: number = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, bindings.encodeUint8Array(to_holder_script), bindings.encodeUint8Array(to_counterparty_script), funding_outpoint == null ? 0n : CommonBase.get_ptr_of(funding_outpoint));
864                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
865                 return ret_conv;
866         }
867
868         /**
869          * Derives a per-commitment-transaction private key (eg an htlc key or delayed_payment key)
870          * from the base secret and the per_commitment_point.
871          */
872         public static constructor_derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): Uint8Array {
873                 const ret: number = bindings.derive_private_key(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), bindings.encodeUint8Array(bindings.check_arr_len(base_secret, 32)));
874                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
875                 return ret_conv;
876         }
877
878         /**
879          * Derives a per-commitment-transaction revocation key from its constituent parts.
880          * 
881          * Only the cheating participant owns a valid witness to propagate a revoked
882          * commitment transaction, thus per_commitment_secret always come from cheater
883          * and revocation_base_secret always come from punisher, which is the broadcaster
884          * of the transaction spending with this key knowledge.
885          */
886         public static constructor_derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): Uint8Array {
887                 const ret: number = bindings.derive_private_revocation_key(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_secret, 32)), bindings.encodeUint8Array(bindings.check_arr_len(countersignatory_revocation_base_secret, 32)));
888                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
889                 return ret_conv;
890         }
891
892         /**
893          * A script either spendable by the revocation
894          * key or the broadcaster_delayed_payment_key and satisfying the relative-locktime OP_CSV constrain.
895          * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
896          */
897         public static constructor_get_revokeable_redeemscript(revocation_key: RevocationKey, contest_delay: number, broadcaster_delayed_payment_key: DelayedPaymentKey): Uint8Array {
898                 const ret: number = bindings.get_revokeable_redeemscript(revocation_key == null ? 0n : CommonBase.get_ptr_of(revocation_key), contest_delay, broadcaster_delayed_payment_key == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_key));
899                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
900                 return ret_conv;
901         }
902
903         /**
904          * Returns the script for the counterparty's output on a holder's commitment transaction based on
905          * the channel type.
906          */
907         public static constructor_get_counterparty_payment_script(channel_type_features: ChannelTypeFeatures, payment_key: Uint8Array): Uint8Array {
908                 const ret: number = bindings.get_counterparty_payment_script(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), bindings.encodeUint8Array(bindings.check_arr_len(payment_key, 33)));
909                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
910                 return ret_conv;
911         }
912
913         /**
914          * Gets the witness redeemscript for an HTLC output in a commitment transaction. Note that htlc
915          * does not need to have its previous_output_index filled.
916          */
917         public static constructor_get_htlc_redeemscript(htlc: HTLCOutputInCommitment, channel_type_features: ChannelTypeFeatures, keys: TxCreationKeys): Uint8Array {
918                 const ret: number = bindings.get_htlc_redeemscript(htlc == null ? 0n : CommonBase.get_ptr_of(htlc), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), keys == null ? 0n : CommonBase.get_ptr_of(keys));
919                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
920                 return ret_conv;
921         }
922
923         /**
924          * Gets the redeemscript for a funding output from the two funding public keys.
925          * Note that the order of funding public keys does not matter.
926          */
927         public static constructor_make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
928                 const ret: number = bindings.make_funding_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(broadcaster, 33)), bindings.encodeUint8Array(bindings.check_arr_len(countersignatory, 33)));
929                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
930                 return ret_conv;
931         }
932
933         /**
934          * Builds an unsigned HTLC-Success or HTLC-Timeout transaction from the given channel and HTLC
935          * parameters. This is used by [`TrustedCommitmentTransaction::get_htlc_sigs`] to fetch the
936          * transaction which needs signing, and can be used to construct an HTLC transaction which is
937          * broadcastable given a counterparty HTLC signature.
938          * 
939          * Panics if htlc.transaction_output_index.is_none() (as such HTLCs do not appear in the
940          * commitment transaction).
941          */
942         public static constructor_build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: HTLCOutputInCommitment, channel_type_features: ChannelTypeFeatures, broadcaster_delayed_payment_key: DelayedPaymentKey, revocation_key: RevocationKey): Uint8Array {
943                 const ret: number = bindings.build_htlc_transaction(bindings.encodeUint8Array(bindings.check_arr_len(commitment_txid, 32)), feerate_per_kw, contest_delay, htlc == null ? 0n : CommonBase.get_ptr_of(htlc), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features), broadcaster_delayed_payment_key == null ? 0n : CommonBase.get_ptr_of(broadcaster_delayed_payment_key), revocation_key == null ? 0n : CommonBase.get_ptr_of(revocation_key));
944                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
945                 return ret_conv;
946         }
947
948         /**
949          * Returns the witness required to satisfy and spend a HTLC input.
950          */
951         public static constructor_build_htlc_input_witness(local_sig: Uint8Array, remote_sig: Uint8Array, preimage: Option_ThirtyTwoBytesZ, redeem_script: Uint8Array, channel_type_features: ChannelTypeFeatures): Uint8Array {
952                 const ret: number = bindings.build_htlc_input_witness(bindings.encodeUint8Array(bindings.check_arr_len(local_sig, 64)), bindings.encodeUint8Array(bindings.check_arr_len(remote_sig, 64)), CommonBase.get_ptr_of(preimage), bindings.encodeUint8Array(redeem_script), channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features));
953                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
954                 return ret_conv;
955         }
956
957         /**
958          * Gets the witnessScript for the to_remote output when anchors are enabled.
959          */
960         public static constructor_get_to_countersignatory_with_anchors_redeemscript(payment_point: Uint8Array): Uint8Array {
961                 const ret: number = bindings.get_to_countersignatory_with_anchors_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(payment_point, 33)));
962                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
963                 return ret_conv;
964         }
965
966         /**
967          * Gets the witnessScript for an anchor output from the funding public key.
968          * The witness in the spending input must be:
969          * <BIP 143 funding_signature>
970          * After 16 blocks of confirmation, an alternative satisfying witness could be:
971          * <>
972          * (empty vector required to satisfy compliance with MINIMALIF-standard rule)
973          */
974         public static constructor_get_anchor_redeemscript(funding_pubkey: Uint8Array): Uint8Array {
975                 const ret: number = bindings.get_anchor_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey, 33)));
976                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
977                 return ret_conv;
978         }
979
980         /**
981          * Returns the witness required to satisfy and spend an anchor input.
982          */
983         public static constructor_build_anchor_input_witness(funding_key: Uint8Array, funding_sig: Uint8Array): Uint8Array {
984                 const ret: number = bindings.build_anchor_input_witness(bindings.encodeUint8Array(bindings.check_arr_len(funding_key, 33)), bindings.encodeUint8Array(bindings.check_arr_len(funding_sig, 64)));
985                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
986                 return ret_conv;
987         }
988
989         /**
990          * Commitment transaction numbers which appear in the transactions themselves are XOR'd with a
991          * shared secret first. This prevents on-chain observers from discovering how many commitment
992          * transactions occurred in a channel before it was closed.
993          * 
994          * This function gets the shared secret from relevant channel public keys and can be used to
995          * \"decrypt\" the commitment transaction number given a commitment transaction on-chain.
996          */
997         public static constructor_get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): bigint {
998                 const ret: bigint = bindings.get_commitment_transaction_number_obscure_factor(bindings.encodeUint8Array(bindings.check_arr_len(broadcaster_payment_basepoint, 33)), bindings.encodeUint8Array(bindings.check_arr_len(countersignatory_payment_basepoint, 33)), outbound_from_broadcaster);
999                 return ret;
1000         }
1001
1002         /**
1003          * Read a NetworkUpdate from a byte array, created by NetworkUpdate_write
1004          */
1005         public static constructor_NetworkUpdate_read(ser: Uint8Array): Result_COption_NetworkUpdateZDecodeErrorZ {
1006                 const ret: bigint = bindings.NetworkUpdate_read(bindings.encodeUint8Array(ser));
1007                 const ret_hu_conv: Result_COption_NetworkUpdateZDecodeErrorZ = Result_COption_NetworkUpdateZDecodeErrorZ.constr_from_ptr(ret);
1008                 return ret_hu_conv;
1009         }
1010
1011         /**
1012          * Verifies the signature of a [`NodeAnnouncement`].
1013          * 
1014          * Returns an error if it is invalid.
1015          */
1016         public static constructor_verify_node_announcement(msg: NodeAnnouncement): Result_NoneLightningErrorZ {
1017                 const ret: bigint = bindings.verify_node_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg));
1018                 const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret);
1019                 CommonBase.add_ref_from(ret_hu_conv, msg);
1020                 return ret_hu_conv;
1021         }
1022
1023         /**
1024          * Verifies all signatures included in a [`ChannelAnnouncement`].
1025          * 
1026          * Returns an error if one of the signatures is invalid.
1027          */
1028         public static constructor_verify_channel_announcement(msg: ChannelAnnouncement): Result_NoneLightningErrorZ {
1029                 const ret: bigint = bindings.verify_channel_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg));
1030                 const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret);
1031                 CommonBase.add_ref_from(ret_hu_conv, msg);
1032                 return ret_hu_conv;
1033         }
1034
1035         /**
1036          * Finds a route from us (payer) to the given target node (payee).
1037          * 
1038          * If the payee provided features in their invoice, they should be provided via the `payee` field
1039          * in the given [`RouteParameters::payment_params`].
1040          * Without this, MPP will only be used if the payee's features are available in the network graph.
1041          * 
1042          * Private routing paths between a public node and the target may be included in the `payee` field
1043          * of [`RouteParameters::payment_params`].
1044          * 
1045          * If some channels aren't announced, it may be useful to fill in `first_hops` with the results
1046          * from [`ChannelManager::list_usable_channels`]. If it is filled in, the view of these channels
1047          * from `network_graph` will be ignored, and only those in `first_hops` will be used.
1048          * 
1049          * The fees on channels from us to the next hop are ignored as they are assumed to all be equal.
1050          * However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` /
1051          * `htlc_maximum_msat` *are* checked as they may change based on the receiving node.
1052          * 
1053          * # Panics
1054          * 
1055          * Panics if first_hops contains channels without `short_channel_id`s;
1056          * [`ChannelManager::list_usable_channels`] will never include such channels.
1057          * 
1058          * [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
1059          * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
1060          * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
1061          * 
1062          * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
1063          */
1064         public static constructor_find_route(our_node_pubkey: Uint8Array, route_params: RouteParameters, network_graph: NetworkGraph, first_hops: ChannelDetails[]|null, logger: Logger, scorer: ScoreLookUp, score_params: ProbabilisticScoringFeeParameters, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
1065                 const ret: bigint = bindings.find_route(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), bindings.encodeUint64Array(first_hops != null ? first_hops.map(first_hops_conv_16 => first_hops_conv_16 == null ? 0n : CommonBase.get_ptr_of(first_hops_conv_16)) : null), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(scorer), score_params == null ? 0n : CommonBase.get_ptr_of(score_params), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32)));
1066                 const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
1067                 CommonBase.add_ref_from(ret_hu_conv, route_params);
1068                 CommonBase.add_ref_from(ret_hu_conv, network_graph);
1069                 if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); }) };
1070                 CommonBase.add_ref_from(ret_hu_conv, logger);
1071                 CommonBase.add_ref_from(ret_hu_conv, scorer);
1072                 CommonBase.add_ref_from(ret_hu_conv, score_params);
1073                 return ret_hu_conv;
1074         }
1075
1076         /**
1077          * Construct a route from us (payer) to the target node (payee) via the given hops (which should
1078          * exclude the payer, but include the payee). This may be useful, e.g., for probing the chosen path.
1079          * 
1080          * Re-uses logic from `find_route`, so the restrictions described there also apply here.
1081          */
1082         public static constructor_build_route_from_hops(our_node_pubkey: Uint8Array, hops: Uint8Array[], route_params: RouteParameters, network_graph: NetworkGraph, logger: Logger, random_seed_bytes: Uint8Array): Result_RouteLightningErrorZ {
1083                 const ret: bigint = bindings.build_route_from_hops(bindings.encodeUint8Array(bindings.check_arr_len(our_node_pubkey, 33)), bindings.encodeUint32Array(hops.map(hops_conv_12 => bindings.encodeUint8Array(bindings.check_arr_len(hops_conv_12, 33)))), route_params == null ? 0n : CommonBase.get_ptr_of(route_params), network_graph == null ? 0n : CommonBase.get_ptr_of(network_graph), CommonBase.get_ptr_of(logger), bindings.encodeUint8Array(bindings.check_arr_len(random_seed_bytes, 32)));
1084                 const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
1085                 CommonBase.add_ref_from(ret_hu_conv, route_params);
1086                 CommonBase.add_ref_from(ret_hu_conv, network_graph);
1087                 CommonBase.add_ref_from(ret_hu_conv, logger);
1088                 return ret_hu_conv;
1089         }
1090
1091         /**
1092          * Creates an unsigned [`PartiallySignedTransaction`] which spends the given descriptors to
1093          * the given outputs, plus an output to the given change destination (if sufficient
1094          * change value remains). The PSBT will have a feerate, at least, of the given value.
1095          * 
1096          * The `locktime` argument is used to set the transaction's locktime. If `None`, the
1097          * transaction will have a locktime of 0. It it recommended to set this to the current block
1098          * height to avoid fee sniping, unless you have some specific reason to use a different
1099          * locktime.
1100          * 
1101          * Returns the PSBT and expected max transaction weight.
1102          * 
1103          * Returns `Err(())` if the output value is greater than the input value minus required fee,
1104          * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
1105          * does not match the one we can spend.
1106          * 
1107          * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
1108          */
1109         public static constructor_SpendableOutputDescriptor_create_spendable_outputs_psbt(descriptors: SpendableOutputDescriptor[], outputs: TxOut[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number, locktime: Option_u32Z): Result_C2Tuple_CVec_u8Zu64ZNoneZ {
1110                 const ret: bigint = bindings.SpendableOutputDescriptor_create_spendable_outputs_psbt(bindings.encodeUint64Array(descriptors.map(descriptors_conv_27 => CommonBase.get_ptr_of(descriptors_conv_27))), bindings.encodeUint64Array(outputs.map(outputs_conv_7 => CommonBase.get_ptr_of(outputs_conv_7))), bindings.encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight, CommonBase.get_ptr_of(locktime));
1111                 const ret_hu_conv: Result_C2Tuple_CVec_u8Zu64ZNoneZ = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret);
1112                 descriptors.forEach((descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(ret_hu_conv, descriptors_conv_27); });
1113                 CommonBase.add_ref_from(ret_hu_conv, locktime);
1114                 return ret_hu_conv;
1115         }
1116
1117         /**
1118          * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
1119          * `path`.
1120          * 
1121          * Returns the node id of the peer to send the message to, the message itself, and any addresses
1122          * need to connect to the first node.
1123          * 
1124          * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
1125          */
1126         public static constructor_create_onion_message(entropy_source: EntropySource, node_signer: NodeSigner, path: OnionMessagePath, contents: OnionMessageContents, reply_path: BlindedPath|null): Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ {
1127                 const ret: bigint = bindings.create_onion_message(CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), path == null ? 0n : CommonBase.get_ptr_of(path), CommonBase.get_ptr_of(contents), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
1128                 const ret_hu_conv: Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
1129                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1130                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1131                 CommonBase.add_ref_from(ret_hu_conv, path);
1132                 CommonBase.add_ref_from(ret_hu_conv, contents);
1133                 CommonBase.add_ref_from(ret_hu_conv, reply_path);
1134                 return ret_hu_conv;
1135         }
1136
1137         /**
1138          * Decode one layer of an incoming [`OnionMessage`].
1139          * 
1140          * Returns either the next layer of the onion for forwarding or the decrypted content for the
1141          * receiver.
1142          */
1143         public static constructor_peel_onion_message(msg: OnionMessage, node_signer: NodeSigner, logger: Logger, custom_handler: CustomOnionMessageHandler): Result_PeeledOnionNoneZ {
1144                 const ret: bigint = bindings.peel_onion_message(msg == null ? 0n : CommonBase.get_ptr_of(msg), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), CommonBase.get_ptr_of(custom_handler));
1145                 const ret_hu_conv: Result_PeeledOnionNoneZ = Result_PeeledOnionNoneZ.constr_from_ptr(ret);
1146                 CommonBase.add_ref_from(ret_hu_conv, msg);
1147                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1148                 CommonBase.add_ref_from(ret_hu_conv, logger);
1149                 CommonBase.add_ref_from(ret_hu_conv, custom_handler);
1150                 return ret_hu_conv;
1151         }
1152
1153         /**
1154          * Returns whether `tlv_type` corresponds to a TLV record for Offers.
1155          */
1156         public static constructor_OffersMessage_is_known_type(tlv_type: bigint): boolean {
1157                 const ret: boolean = bindings.OffersMessage_is_known_type(tlv_type);
1158                 return ret;
1159         }
1160
1161         /**
1162          * Create a one-hop blinded path for a payment.
1163          */
1164         public static constructor_BlindedPath_one_hop_for_payment(payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ {
1165                 const ret: bigint = bindings.BlindedPath_one_hop_for_payment(bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0n : CommonBase.get_ptr_of(payee_tlvs), CommonBase.get_ptr_of(entropy_source));
1166                 const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
1167                 CommonBase.add_ref_from(ret_hu_conv, payee_tlvs);
1168                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1169                 return ret_hu_conv;
1170         }
1171
1172         /**
1173          * Create a blinded path for a payment, to be forwarded along `intermediate_nodes`.
1174          * 
1175          * Errors if:
1176          * a provided node id is invalid
1177          * [`BlindedPayInfo`] calculation results in an integer overflow
1178          * any unknown features are required in the provided [`ForwardTlvs`]
1179          * 
1180          * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs
1181          */
1182         public static constructor_BlindedPath_new_for_payment(intermediate_nodes: ForwardNode[], payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, htlc_maximum_msat: bigint, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ {
1183                 const ret: bigint = bindings.BlindedPath_new_for_payment(bindings.encodeUint64Array(intermediate_nodes.map(intermediate_nodes_conv_13 => intermediate_nodes_conv_13 == null ? 0n : CommonBase.get_ptr_of(intermediate_nodes_conv_13))), bindings.encodeUint8Array(bindings.check_arr_len(payee_node_id, 33)), payee_tlvs == null ? 0n : CommonBase.get_ptr_of(payee_tlvs), htlc_maximum_msat, CommonBase.get_ptr_of(entropy_source));
1184                 const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
1185                 intermediate_nodes.forEach((intermediate_nodes_conv_13: ForwardNode) => { CommonBase.add_ref_from(ret_hu_conv, intermediate_nodes_conv_13); });
1186                 CommonBase.add_ref_from(ret_hu_conv, payee_tlvs);
1187                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1188                 return ret_hu_conv;
1189         }
1190
1191         /**
1192          * Read a PathFailure from a byte array, created by PathFailure_write
1193          */
1194         public static constructor_PathFailure_read(ser: Uint8Array): Result_COption_PathFailureZDecodeErrorZ {
1195                 const ret: bigint = bindings.PathFailure_read(bindings.encodeUint8Array(ser));
1196                 const ret_hu_conv: Result_COption_PathFailureZDecodeErrorZ = Result_COption_PathFailureZDecodeErrorZ.constr_from_ptr(ret);
1197                 return ret_hu_conv;
1198         }
1199
1200         /**
1201          * Read a ClosureReason from a byte array, created by ClosureReason_write
1202          */
1203         public static constructor_ClosureReason_read(ser: Uint8Array): Result_COption_ClosureReasonZDecodeErrorZ {
1204                 const ret: bigint = bindings.ClosureReason_read(bindings.encodeUint8Array(ser));
1205                 const ret_hu_conv: Result_COption_ClosureReasonZDecodeErrorZ = Result_COption_ClosureReasonZDecodeErrorZ.constr_from_ptr(ret);
1206                 return ret_hu_conv;
1207         }
1208
1209         /**
1210          * Read a HTLCDestination from a byte array, created by HTLCDestination_write
1211          */
1212         public static constructor_HTLCDestination_read(ser: Uint8Array): Result_COption_HTLCDestinationZDecodeErrorZ {
1213                 const ret: bigint = bindings.HTLCDestination_read(bindings.encodeUint8Array(ser));
1214                 const ret_hu_conv: Result_COption_HTLCDestinationZDecodeErrorZ = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret);
1215                 return ret_hu_conv;
1216         }
1217
1218         /**
1219          * Read a Event from a byte array, created by Event_write
1220          */
1221         public static constructor_Event_read(ser: Uint8Array): Result_COption_EventZDecodeErrorZ {
1222                 const ret: bigint = bindings.Event_read(bindings.encodeUint8Array(ser));
1223                 const ret_hu_conv: Result_COption_EventZDecodeErrorZ = Result_COption_EventZDecodeErrorZ.constr_from_ptr(ret);
1224                 return ret_hu_conv;
1225         }
1226
1227         /**
1228          * Builds the necessary parameters to pay or pre-flight probe the given zero-amount
1229          * [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
1230          * [`ChannelManager::send_preflight_probes`].
1231          * 
1232          * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
1233          * same [`PaymentHash`] has never been paid before.
1234          * 
1235          * Will always succeed unless the invoice has an amount specified, in which case
1236          * [`payment_parameters_from_invoice`] should be used.
1237          * 
1238          * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
1239          * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
1240          */
1241         public static constructor_payment_parameters_from_zero_amount_invoice(invoice: Bolt11Invoice, amount_msat: bigint): Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ {
1242                 const ret: bigint = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msat);
1243                 const ret_hu_conv: Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
1244                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1245                 return ret_hu_conv;
1246         }
1247
1248         /**
1249          * Builds the necessary parameters to pay or pre-flight probe the given [`Bolt11Invoice`] using
1250          * [`ChannelManager::send_payment`] or [`ChannelManager::send_preflight_probes`].
1251          * 
1252          * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
1253          * same [`PaymentHash`] has never been paid before.
1254          * 
1255          * Will always succeed unless the invoice has no amount specified, in which case
1256          * [`payment_parameters_from_zero_amount_invoice`] should be used.
1257          * 
1258          * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
1259          * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
1260          */
1261         public static constructor_payment_parameters_from_invoice(invoice: Bolt11Invoice): Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ {
1262                 const ret: bigint = bindings.payment_parameters_from_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice));
1263                 const ret_hu_conv: Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
1264                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1265                 return ret_hu_conv;
1266         }
1267
1268         /**
1269          * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
1270          * See [`PhantomKeysManager`] for more information on phantom node payments.
1271          * 
1272          * `phantom_route_hints` parameter:
1273          * Contains channel info for all nodes participating in the phantom invoice
1274          * Entries are retrieved from a call to [`ChannelManager::get_phantom_route_hints`] on each
1275          * participating node
1276          * It is fine to cache `phantom_route_hints` and reuse it across invoices, as long as the data is
1277          * updated when a channel becomes disabled or closes
1278          * Note that if too many channels are included in [`PhantomRouteHints::channels`], the invoice
1279          * may be too long for QR code scanning. To fix this, `PhantomRouteHints::channels` may be pared
1280          * down
1281          * 
1282          * `payment_hash` can be specified if you have a specific need for a custom payment hash (see the difference
1283          * between [`ChannelManager::create_inbound_payment`] and [`ChannelManager::create_inbound_payment_for_hash`]).
1284          * If `None` is provided for `payment_hash`, then one will be created.
1285          * 
1286          * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
1287          * in excess of the current time.
1288          * 
1289          * `duration_since_epoch` is the current time since epoch in seconds.
1290          * 
1291          * You can specify a custom `min_final_cltv_expiry_delta`, or let LDK default it to
1292          * [`MIN_FINAL_CLTV_EXPIRY_DELTA`]. The provided expiry must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`] - 3.
1293          * Note that LDK will add a buffer of 3 blocks to the delta to allow for up to a few new block
1294          * confirmations during routing.
1295          * 
1296          * Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
1297          * invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
1298          * requirement).
1299          * 
1300          * [`PhantomKeysManager`]: lightning::sign::PhantomKeysManager
1301          * [`ChannelManager::get_phantom_route_hints`]: lightning::ln::channelmanager::ChannelManager::get_phantom_route_hints
1302          * [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
1303          * [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
1304          * [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
1305          * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
1306          * 
1307          * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1308          * available and the current time is supplied by the caller.
1309          */
1310         public static constructor_create_phantom_invoice(amt_msat: Option_u64Z, payment_hash: Option_ThirtyTwoBytesZ, description: string, invoice_expiry_delta_secs: number, phantom_route_hints: PhantomRouteHints[], entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, network: Currency, min_final_cltv_expiry_delta: Option_u16Z, duration_since_epoch: bigint): Result_Bolt11InvoiceSignOrCreationErrorZ {
1311                 const ret: bigint = bindings.create_phantom_invoice(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), bindings.encodeString(description), invoice_expiry_delta_secs, bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0n : CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch);
1312                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1313                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1314                 CommonBase.add_ref_from(ret_hu_conv, payment_hash);
1315                 phantom_route_hints.forEach((phantom_route_hints_conv_19: PhantomRouteHints) => { CommonBase.add_ref_from(ret_hu_conv, phantom_route_hints_conv_19); });
1316                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1317                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1318                 CommonBase.add_ref_from(ret_hu_conv, logger);
1319                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1320                 return ret_hu_conv;
1321         }
1322
1323         /**
1324          * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
1325          * See [`PhantomKeysManager`] for more information on phantom node payments.
1326          * 
1327          * `phantom_route_hints` parameter:
1328          * Contains channel info for all nodes participating in the phantom invoice
1329          * Entries are retrieved from a call to [`ChannelManager::get_phantom_route_hints`] on each
1330          * participating node
1331          * It is fine to cache `phantom_route_hints` and reuse it across invoices, as long as the data is
1332          * updated when a channel becomes disabled or closes
1333          * Note that the route hints generated from `phantom_route_hints` will be limited to a maximum
1334          * of 3 hints to ensure that the invoice can be scanned in a QR code. These hints are selected
1335          * in the order that the nodes in `PhantomRouteHints` are specified, selecting one hint per node
1336          * until the maximum is hit. Callers may provide as many `PhantomRouteHints::channels` as
1337          * desired, but note that some nodes will be trimmed if more than 3 nodes are provided.
1338          * 
1339          * `description_hash` is a SHA-256 hash of the description text
1340          * 
1341          * `payment_hash` can be specified if you have a specific need for a custom payment hash (see the difference
1342          * between [`ChannelManager::create_inbound_payment`] and [`ChannelManager::create_inbound_payment_for_hash`]).
1343          * If `None` is provided for `payment_hash`, then one will be created.
1344          * 
1345          * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
1346          * in excess of the current time.
1347          * 
1348          * `duration_since_epoch` is the current time since epoch in seconds.
1349          * 
1350          * Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
1351          * invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
1352          * requirement).
1353          * 
1354          * [`PhantomKeysManager`]: lightning::sign::PhantomKeysManager
1355          * [`ChannelManager::get_phantom_route_hints`]: lightning::ln::channelmanager::ChannelManager::get_phantom_route_hints
1356          * [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
1357          * [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
1358          * [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
1359          * 
1360          * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1361          * available and the current time is supplied by the caller.
1362          */
1363         public static constructor_create_phantom_invoice_with_description_hash(amt_msat: Option_u64Z, payment_hash: Option_ThirtyTwoBytesZ, invoice_expiry_delta_secs: number, description_hash: Sha256, phantom_route_hints: PhantomRouteHints[], entropy_source: EntropySource, node_signer: NodeSigner, logger: Logger, network: Currency, min_final_cltv_expiry_delta: Option_u16Z, duration_since_epoch: bigint): Result_Bolt11InvoiceSignOrCreationErrorZ {
1364                 const ret: bigint = bindings.create_phantom_invoice_with_description_hash(CommonBase.get_ptr_of(amt_msat), CommonBase.get_ptr_of(payment_hash), invoice_expiry_delta_secs, description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), bindings.encodeUint64Array(phantom_route_hints.map(phantom_route_hints_conv_19 => phantom_route_hints_conv_19 == null ? 0n : CommonBase.get_ptr_of(phantom_route_hints_conv_19))), CommonBase.get_ptr_of(entropy_source), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(min_final_cltv_expiry_delta), duration_since_epoch);
1365                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1366                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1367                 CommonBase.add_ref_from(ret_hu_conv, payment_hash);
1368                 CommonBase.add_ref_from(ret_hu_conv, description_hash);
1369                 phantom_route_hints.forEach((phantom_route_hints_conv_19: PhantomRouteHints) => { CommonBase.add_ref_from(ret_hu_conv, phantom_route_hints_conv_19); });
1370                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1371                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1372                 CommonBase.add_ref_from(ret_hu_conv, logger);
1373                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1374                 return ret_hu_conv;
1375         }
1376
1377         /**
1378          * See [`create_invoice_from_channelmanager_with_description_hash`]
1379          * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1380          * available and the current time is supplied by the caller.
1381          */
1382         public static constructor_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description_hash: Sha256, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ {
1383                 const ret: bigint = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), description_hash == null ? 0n : CommonBase.get_ptr_of(description_hash), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta));
1384                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1385                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1386                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1387                 CommonBase.add_ref_from(ret_hu_conv, logger);
1388                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1389                 CommonBase.add_ref_from(ret_hu_conv, description_hash);
1390                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1391                 return ret_hu_conv;
1392         }
1393
1394         /**
1395          * See [`create_invoice_from_channelmanager`]
1396          * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1397          * available and the current time is supplied by the caller.
1398          */
1399         public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ {
1400                 const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, CommonBase.get_ptr_of(min_final_cltv_expiry_delta));
1401                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1402                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1403                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1404                 CommonBase.add_ref_from(ret_hu_conv, logger);
1405                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1406                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1407                 return ret_hu_conv;
1408         }
1409
1410         /**
1411          * See [`create_invoice_from_channelmanager_and_duration_since_epoch`]
1412          * This version allows for providing a custom [`PaymentHash`] for the invoice.
1413          * This may be useful if you're building an on-chain swap or involving another protocol where
1414          * the payment hash is also involved outside the scope of lightning.
1415          */
1416         public static constructor_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager: ChannelManager, node_signer: NodeSigner, logger: Logger, network: Currency, amt_msat: Option_u64Z, description: string, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, payment_hash: Uint8Array, min_final_cltv_expiry_delta: Option_u16Z): Result_Bolt11InvoiceSignOrCreationErrorZ {
1417                 const ret: bigint = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(node_signer), CommonBase.get_ptr_of(logger), network, CommonBase.get_ptr_of(amt_msat), bindings.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, bindings.encodeUint8Array(bindings.check_arr_len(payment_hash, 32)), CommonBase.get_ptr_of(min_final_cltv_expiry_delta));
1418                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1419                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1420                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1421                 CommonBase.add_ref_from(ret_hu_conv, logger);
1422                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1423                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1424                 return ret_hu_conv;
1425         }
1426
1427 }