[TS] Update auto-generated bindings to 0.0.117
[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 { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs';
5 import { Bolt12SemanticError } from '../enums/Bolt12SemanticError.mjs';
6 import { COption_NoneZ } from '../enums/COption_NoneZ.mjs';
7 import { ChannelMonitorUpdateStatus } from '../enums/ChannelMonitorUpdateStatus.mjs';
8 import { ChannelShutdownState } from '../enums/ChannelShutdownState.mjs';
9 import { ConfirmationTarget } from '../enums/ConfirmationTarget.mjs';
10 import { CreationError } from '../enums/CreationError.mjs';
11 import { Currency } from '../enums/Currency.mjs';
12 import { HTLCClaim } from '../enums/HTLCClaim.mjs';
13 import { IOError } from '../enums/IOError.mjs';
14 import { Level } from '../enums/Level.mjs';
15 import { Network } from '../enums/Network.mjs';
16 import { PaymentFailureReason } from '../enums/PaymentFailureReason.mjs';
17 import { Recipient } from '../enums/Recipient.mjs';
18 import { RetryableSendFailure } from '../enums/RetryableSendFailure.mjs';
19 import { Secp256k1Error } from '../enums/Secp256k1Error.mjs';
20 import { SiPrefix } from '../enums/SiPrefix.mjs';
21 import { SocketAddressParseError } from '../enums/SocketAddressParseError.mjs';
22 import { UtxoLookupError } from '../enums/UtxoLookupError.mjs';
23 import { Bech32Error } from '../structs/Bech32Error.mjs';
24 import { Option_u64Z } from '../structs/Option_u64Z.mjs';
25 import { BlindedPath } from '../structs/BlindedPath.mjs';
26 import { Refund } from '../structs/Refund.mjs';
27 import { Bolt12ParseError } from '../structs/Bolt12ParseError.mjs';
28 import { Result_RefundBolt12ParseErrorZ } from '../structs/Result_RefundBolt12ParseErrorZ.mjs';
29 import { Retry } from '../structs/Retry.mjs';
30 import { DecodeError } from '../structs/DecodeError.mjs';
31 import { Result_RetryDecodeErrorZ } from '../structs/Result_RetryDecodeErrorZ.mjs';
32 import { ShutdownScript } from '../structs/ShutdownScript.mjs';
33 import { APIError } from '../structs/APIError.mjs';
34 import { Result_NoneAPIErrorZ } from '../structs/Result_NoneAPIErrorZ.mjs';
35 import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs';
36 import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs';
37 import { RecipientOnionFields } from '../structs/RecipientOnionFields.mjs';
38 import { Result_RecipientOnionFieldsDecodeErrorZ } from '../structs/Result_RecipientOnionFieldsDecodeErrorZ.mjs';
39 import { TwoTuple_u64CVec_u8ZZ } from '../structs/TwoTuple_u64CVec_u8ZZ.mjs';
40 import { Result_RecipientOnionFieldsNoneZ } from '../structs/Result_RecipientOnionFieldsNoneZ.mjs';
41 import { Option_CVec_ThirtyTwoBytesZZ } from '../structs/Option_CVec_ThirtyTwoBytesZZ.mjs';
42 import { Result_ThirtyTwoBytesNoneZ } from '../structs/Result_ThirtyTwoBytesNoneZ.mjs';
43 import { BlindedPayInfo } from '../structs/BlindedPayInfo.mjs';
44 import { Result_BlindedPayInfoDecodeErrorZ } from '../structs/Result_BlindedPayInfoDecodeErrorZ.mjs';
45 import { DelayedPaymentOutputDescriptor } from '../structs/DelayedPaymentOutputDescriptor.mjs';
46 import { Result_DelayedPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.mjs';
47 import { StaticPaymentOutputDescriptor } from '../structs/StaticPaymentOutputDescriptor.mjs';
48 import { Result_StaticPaymentOutputDescriptorDecodeErrorZ } from '../structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.mjs';
49 import { OutPoint } from '../structs/OutPoint.mjs';
50 import { SpendableOutputDescriptor } from '../structs/SpendableOutputDescriptor.mjs';
51 import { Result_SpendableOutputDescriptorDecodeErrorZ } from '../structs/Result_SpendableOutputDescriptorDecodeErrorZ.mjs';
52 import { Option_u32Z } from '../structs/Option_u32Z.mjs';
53 import { TwoTuple_CVec_u8ZusizeZ } from '../structs/TwoTuple_CVec_u8ZusizeZ.mjs';
54 import { Result_C2Tuple_CVec_u8ZusizeZNoneZ } from '../structs/Result_C2Tuple_CVec_u8ZusizeZNoneZ.mjs';
55 import { Result_NoneNoneZ } from '../structs/Result_NoneNoneZ.mjs';
56 import { TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ } from '../structs/TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ.mjs';
57 import { Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ } from '../structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.mjs';
58 import { Result_ECDSASignatureNoneZ } from '../structs/Result_ECDSASignatureNoneZ.mjs';
59 import { Result_PublicKeyNoneZ } from '../structs/Result_PublicKeyNoneZ.mjs';
60 import { Option_BigEndianScalarZ } from '../structs/Option_BigEndianScalarZ.mjs';
61 import { Result_RecoverableSignatureNoneZ } from '../structs/Result_RecoverableSignatureNoneZ.mjs';
62 import { Result_SchnorrSignatureNoneZ } from '../structs/Result_SchnorrSignatureNoneZ.mjs';
63 import { CommitmentTransaction } from '../structs/CommitmentTransaction.mjs';
64 import { HolderCommitmentTransaction } from '../structs/HolderCommitmentTransaction.mjs';
65 import { HTLCOutputInCommitment } from '../structs/HTLCOutputInCommitment.mjs';
66 import { HTLCDescriptor } from '../structs/HTLCDescriptor.mjs';
67 import { ClosingTransaction } from '../structs/ClosingTransaction.mjs';
68 import { UnsignedChannelAnnouncement } from '../structs/UnsignedChannelAnnouncement.mjs';
69 import { ChannelPublicKeys } from '../structs/ChannelPublicKeys.mjs';
70 import { ChannelTransactionParameters } from '../structs/ChannelTransactionParameters.mjs';
71 import { ChannelSigner, ChannelSignerInterface } from '../structs/ChannelSigner.mjs';
72 import { EcdsaChannelSigner, EcdsaChannelSignerInterface } from '../structs/EcdsaChannelSigner.mjs';
73 import { WriteableEcdsaChannelSigner, WriteableEcdsaChannelSignerInterface } from '../structs/WriteableEcdsaChannelSigner.mjs';
74 import { Result_WriteableEcdsaChannelSignerDecodeErrorZ } from '../structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.mjs';
75 import { Result_CVec_u8ZNoneZ } from '../structs/Result_CVec_u8ZNoneZ.mjs';
76 import { Result_ShutdownScriptNoneZ } from '../structs/Result_ShutdownScriptNoneZ.mjs';
77 import { Option_u16Z } from '../structs/Option_u16Z.mjs';
78 import { Option_boolZ } from '../structs/Option_boolZ.mjs';
79 import { Result_CVec_CVec_u8ZZNoneZ } from '../structs/Result_CVec_CVec_u8ZZNoneZ.mjs';
80 import { InMemorySigner } from '../structs/InMemorySigner.mjs';
81 import { Result_InMemorySignerDecodeErrorZ } from '../structs/Result_InMemorySignerDecodeErrorZ.mjs';
82 import { Result_TransactionNoneZ } from '../structs/Result_TransactionNoneZ.mjs';
83 import { ChannelDetails } from '../structs/ChannelDetails.mjs';
84 import { Route } from '../structs/Route.mjs';
85 import { LightningError } from '../structs/LightningError.mjs';
86 import { Result_RouteLightningErrorZ } from '../structs/Result_RouteLightningErrorZ.mjs';
87 import { InFlightHtlcs } from '../structs/InFlightHtlcs.mjs';
88 import { Result_InFlightHtlcsDecodeErrorZ } from '../structs/Result_InFlightHtlcsDecodeErrorZ.mjs';
89 import { RouteHop } from '../structs/RouteHop.mjs';
90 import { Result_RouteHopDecodeErrorZ } from '../structs/Result_RouteHopDecodeErrorZ.mjs';
91 import { BlindedHop } from '../structs/BlindedHop.mjs';
92 import { BlindedTail } from '../structs/BlindedTail.mjs';
93 import { Result_BlindedTailDecodeErrorZ } from '../structs/Result_BlindedTailDecodeErrorZ.mjs';
94 import { Path } from '../structs/Path.mjs';
95 import { Result_RouteDecodeErrorZ } from '../structs/Result_RouteDecodeErrorZ.mjs';
96 import { RouteParameters } from '../structs/RouteParameters.mjs';
97 import { Result_RouteParametersDecodeErrorZ } from '../structs/Result_RouteParametersDecodeErrorZ.mjs';
98 import { PaymentParameters } from '../structs/PaymentParameters.mjs';
99 import { Result_PaymentParametersDecodeErrorZ } from '../structs/Result_PaymentParametersDecodeErrorZ.mjs';
100 import { TwoTuple_BlindedPayInfoBlindedPathZ } from '../structs/TwoTuple_BlindedPayInfoBlindedPathZ.mjs';
101 import { RouteHint } from '../structs/RouteHint.mjs';
102 import { RouteHintHop } from '../structs/RouteHintHop.mjs';
103 import { Result_RouteHintDecodeErrorZ } from '../structs/Result_RouteHintDecodeErrorZ.mjs';
104 import { Result_RouteHintHopDecodeErrorZ } from '../structs/Result_RouteHintHopDecodeErrorZ.mjs';
105 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
106 import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
107 import { NodeId } from '../structs/NodeId.mjs';
108 import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
109 import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
110 import { TwoTuple_Z } from '../structs/TwoTuple_Z.mjs';
111 import { TwoTuple__u1632_u1632Z } from '../structs/TwoTuple__u1632_u1632Z.mjs';
112 import { Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ } from '../structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.mjs';
113 import { Option_f64Z } from '../structs/Option_f64Z.mjs';
114 import { Record } from '../structs/Record.mjs';
115 import { Logger, LoggerInterface } from '../structs/Logger.mjs';
116 import { NetworkGraph } from '../structs/NetworkGraph.mjs';
117 import { ProbabilisticScorer } from '../structs/ProbabilisticScorer.mjs';
118 import { Result_ProbabilisticScorerDecodeErrorZ } from '../structs/Result_ProbabilisticScorerDecodeErrorZ.mjs';
119 import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransactionZ.mjs';
120 import { TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ } from '../structs/TwoTuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZ.mjs';
121 import { Result_ChannelMonitorUpdateStatusNoneZ } from '../structs/Result_ChannelMonitorUpdateStatusNoneZ.mjs';
122 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
123 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
124 import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
125 import { InitFeatures } from '../structs/InitFeatures.mjs';
126 import { Result_InitFeaturesDecodeErrorZ } from '../structs/Result_InitFeaturesDecodeErrorZ.mjs';
127 import { ChannelFeatures } from '../structs/ChannelFeatures.mjs';
128 import { Result_ChannelFeaturesDecodeErrorZ } from '../structs/Result_ChannelFeaturesDecodeErrorZ.mjs';
129 import { NodeFeatures } from '../structs/NodeFeatures.mjs';
130 import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesDecodeErrorZ.mjs';
131 import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs';
132 import { Result_Bolt11InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.mjs';
133 import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs';
134 import { Result_Bolt12InvoiceFeaturesDecodeErrorZ } from '../structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.mjs';
135 import { BlindedHopFeatures } from '../structs/BlindedHopFeatures.mjs';
136 import { Result_BlindedHopFeaturesDecodeErrorZ } from '../structs/Result_BlindedHopFeaturesDecodeErrorZ.mjs';
137 import { ChannelTypeFeatures } from '../structs/ChannelTypeFeatures.mjs';
138 import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
139 import { Offer } from '../structs/Offer.mjs';
140 import { Result_OfferBolt12ParseErrorZ } from '../structs/Result_OfferBolt12ParseErrorZ.mjs';
141 import { Result_PublicKeySecp256k1ErrorZ } from '../structs/Result_PublicKeySecp256k1ErrorZ.mjs';
142 import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
143 import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
144 import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
145 import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
146 import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
147 import { Result_TxOutUtxoLookupErrorZ } from '../structs/Result_TxOutUtxoLookupErrorZ.mjs';
148 import { UtxoFuture } from '../structs/UtxoFuture.mjs';
149 import { UtxoResult } from '../structs/UtxoResult.mjs';
150 import { UtxoLookup, UtxoLookupInterface } from '../structs/UtxoLookup.mjs';
151 import { Option_UtxoLookupZ } from '../structs/Option_UtxoLookupZ.mjs';
152 import { Result_NoneLightningErrorZ } from '../structs/Result_NoneLightningErrorZ.mjs';
153 import { Result_boolLightningErrorZ } from '../structs/Result_boolLightningErrorZ.mjs';
154 import { ChannelAnnouncement } from '../structs/ChannelAnnouncement.mjs';
155 import { ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ } from '../structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.mjs';
156 import { Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ } from '../structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.mjs';
157 import { AcceptChannel } from '../structs/AcceptChannel.mjs';
158 import { AcceptChannelV2 } from '../structs/AcceptChannelV2.mjs';
159 import { OpenChannel } from '../structs/OpenChannel.mjs';
160 import { OpenChannelV2 } from '../structs/OpenChannelV2.mjs';
161 import { FundingCreated } from '../structs/FundingCreated.mjs';
162 import { FundingSigned } from '../structs/FundingSigned.mjs';
163 import { TxAddInput } from '../structs/TxAddInput.mjs';
164 import { TxAddOutput } from '../structs/TxAddOutput.mjs';
165 import { TxRemoveInput } from '../structs/TxRemoveInput.mjs';
166 import { TxRemoveOutput } from '../structs/TxRemoveOutput.mjs';
167 import { TxComplete } from '../structs/TxComplete.mjs';
168 import { TxSignatures } from '../structs/TxSignatures.mjs';
169 import { TxInitRbf } from '../structs/TxInitRbf.mjs';
170 import { TxAckRbf } from '../structs/TxAckRbf.mjs';
171 import { TxAbort } from '../structs/TxAbort.mjs';
172 import { ChannelReady } from '../structs/ChannelReady.mjs';
173 import { AnnouncementSignatures } from '../structs/AnnouncementSignatures.mjs';
174 import { CommitmentUpdate } from '../structs/CommitmentUpdate.mjs';
175 import { RevokeAndACK } from '../structs/RevokeAndACK.mjs';
176 import { ClosingSigned } from '../structs/ClosingSigned.mjs';
177 import { Shutdown } from '../structs/Shutdown.mjs';
178 import { ChannelReestablish } from '../structs/ChannelReestablish.mjs';
179 import { NodeAnnouncement } from '../structs/NodeAnnouncement.mjs';
180 import { ErrorMessage } from '../structs/ErrorMessage.mjs';
181 import { WarningMessage } from '../structs/WarningMessage.mjs';
182 import { ErrorAction } from '../structs/ErrorAction.mjs';
183 import { QueryChannelRange } from '../structs/QueryChannelRange.mjs';
184 import { QueryShortChannelIds } from '../structs/QueryShortChannelIds.mjs';
185 import { ReplyChannelRange } from '../structs/ReplyChannelRange.mjs';
186 import { GossipTimestampFilter } from '../structs/GossipTimestampFilter.mjs';
187 import { MessageSendEvent } from '../structs/MessageSendEvent.mjs';
188 import { ChannelUpdateInfo } from '../structs/ChannelUpdateInfo.mjs';
189 import { Result_ChannelUpdateInfoDecodeErrorZ } from '../structs/Result_ChannelUpdateInfoDecodeErrorZ.mjs';
190 import { ChannelInfo } from '../structs/ChannelInfo.mjs';
191 import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
192 import { RoutingFees } from '../structs/RoutingFees.mjs';
193 import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
194 import { Hostname } from '../structs/Hostname.mjs';
195 import { SocketAddress } from '../structs/SocketAddress.mjs';
196 import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
197 import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
198 import { NodeAlias } from '../structs/NodeAlias.mjs';
199 import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
200 import { NodeInfo } from '../structs/NodeInfo.mjs';
201 import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
202 import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
203 import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs';
204 import { ChannelDerivationParameters } from '../structs/ChannelDerivationParameters.mjs';
205 import { Result_ChannelDerivationParametersDecodeErrorZ } from '../structs/Result_ChannelDerivationParametersDecodeErrorZ.mjs';
206 import { Result_HTLCDescriptorDecodeErrorZ } from '../structs/Result_HTLCDescriptorDecodeErrorZ.mjs';
207 import { Utxo } from '../structs/Utxo.mjs';
208 import { Option_TxOutZ } from '../structs/Option_TxOutZ.mjs';
209 import { Input } from '../structs/Input.mjs';
210 import { CoinSelection } from '../structs/CoinSelection.mjs';
211 import { Result_CoinSelectionNoneZ } from '../structs/Result_CoinSelectionNoneZ.mjs';
212 import { Result_CVec_UtxoZNoneZ } from '../structs/Result_CVec_UtxoZNoneZ.mjs';
213 import { TwoTuple_u64u16Z } from '../structs/TwoTuple_u64u16Z.mjs';
214 import { Option_C2Tuple_u64u16ZZ } from '../structs/Option_C2Tuple_u64u16ZZ.mjs';
215 import { Option_ChannelShutdownStateZ } from '../structs/Option_ChannelShutdownStateZ.mjs';
216 import { Result_ThirtyTwoBytesAPIErrorZ } from '../structs/Result_ThirtyTwoBytesAPIErrorZ.mjs';
217 import { RecentPaymentDetails } from '../structs/RecentPaymentDetails.mjs';
218 import { PaymentSendFailure } from '../structs/PaymentSendFailure.mjs';
219 import { Result_NonePaymentSendFailureZ } from '../structs/Result_NonePaymentSendFailureZ.mjs';
220 import { Result_NoneRetryableSendFailureZ } from '../structs/Result_NoneRetryableSendFailureZ.mjs';
221 import { Result_ThirtyTwoBytesPaymentSendFailureZ } from '../structs/Result_ThirtyTwoBytesPaymentSendFailureZ.mjs';
222 import { Result_ThirtyTwoBytesRetryableSendFailureZ } from '../structs/Result_ThirtyTwoBytesRetryableSendFailureZ.mjs';
223 import { TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ } from '../structs/TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ.mjs';
224 import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.mjs';
225 import { ProbeSendFailure } from '../structs/ProbeSendFailure.mjs';
226 import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.mjs';
227 import { TwoTuple_ThirtyTwoBytesPublicKeyZ } from '../structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.mjs';
228 import { Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.mjs';
229 import { CounterpartyForwardingInfo } from '../structs/CounterpartyForwardingInfo.mjs';
230 import { Result_CounterpartyForwardingInfoDecodeErrorZ } from '../structs/Result_CounterpartyForwardingInfoDecodeErrorZ.mjs';
231 import { ChannelCounterparty } from '../structs/ChannelCounterparty.mjs';
232 import { Result_ChannelCounterpartyDecodeErrorZ } from '../structs/Result_ChannelCounterpartyDecodeErrorZ.mjs';
233 import { Result_ChannelDetailsDecodeErrorZ } from '../structs/Result_ChannelDetailsDecodeErrorZ.mjs';
234 import { PhantomRouteHints } from '../structs/PhantomRouteHints.mjs';
235 import { Result_PhantomRouteHintsDecodeErrorZ } from '../structs/Result_PhantomRouteHintsDecodeErrorZ.mjs';
236 import { Result_ChannelShutdownStateDecodeErrorZ } from '../structs/Result_ChannelShutdownStateDecodeErrorZ.mjs';
237 import { ChannelMonitor } from '../structs/ChannelMonitor.mjs';
238 import { ChannelMonitorUpdate } from '../structs/ChannelMonitorUpdate.mjs';
239 import { Watch, WatchInterface } from '../structs/Watch.mjs';
240 import { BroadcasterInterface, BroadcasterInterfaceInterface } from '../structs/BroadcasterInterface.mjs';
241 import { EntropySource, EntropySourceInterface } from '../structs/EntropySource.mjs';
242 import { UnsignedInvoiceRequest } from '../structs/UnsignedInvoiceRequest.mjs';
243 import { UnsignedBolt12Invoice } from '../structs/UnsignedBolt12Invoice.mjs';
244 import { UnsignedChannelUpdate } from '../structs/UnsignedChannelUpdate.mjs';
245 import { UnsignedNodeAnnouncement } from '../structs/UnsignedNodeAnnouncement.mjs';
246 import { UnsignedGossipMessage } from '../structs/UnsignedGossipMessage.mjs';
247 import { NodeSigner, NodeSignerInterface } from '../structs/NodeSigner.mjs';
248 import { SignerProvider, SignerProviderInterface } from '../structs/SignerProvider.mjs';
249 import { FeeEstimator, FeeEstimatorInterface } from '../structs/FeeEstimator.mjs';
250 import { Router, RouterInterface } from '../structs/Router.mjs';
251 import { ChannelManager } from '../structs/ChannelManager.mjs';
252 import { TwoTuple_ThirtyTwoBytesChannelManagerZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.mjs';
253 import { Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.mjs';
254 import { MaxDustHTLCExposure } from '../structs/MaxDustHTLCExposure.mjs';
255 import { Result_MaxDustHTLCExposureDecodeErrorZ } from '../structs/Result_MaxDustHTLCExposureDecodeErrorZ.mjs';
256 import { ChannelConfig } from '../structs/ChannelConfig.mjs';
257 import { Result_ChannelConfigDecodeErrorZ } from '../structs/Result_ChannelConfigDecodeErrorZ.mjs';
258 import { Option_MaxDustHTLCExposureZ } from '../structs/Option_MaxDustHTLCExposureZ.mjs';
259 import { Option_APIErrorZ } from '../structs/Option_APIErrorZ.mjs';
260 import { Result_COption_APIErrorZDecodeErrorZ } from '../structs/Result_COption_APIErrorZDecodeErrorZ.mjs';
261 import { Result_ChannelMonitorUpdateDecodeErrorZ } from '../structs/Result_ChannelMonitorUpdateDecodeErrorZ.mjs';
262 import { Option_MonitorEventZ } from '../structs/Option_MonitorEventZ.mjs';
263 import { Result_COption_MonitorEventZDecodeErrorZ } from '../structs/Result_COption_MonitorEventZDecodeErrorZ.mjs';
264 import { Result_HTLCUpdateDecodeErrorZ } from '../structs/Result_HTLCUpdateDecodeErrorZ.mjs';
265 import { TwoTuple_OutPointCVec_u8ZZ } from '../structs/TwoTuple_OutPointCVec_u8ZZ.mjs';
266 import { TwoTuple_u32CVec_u8ZZ } from '../structs/TwoTuple_u32CVec_u8ZZ.mjs';
267 import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.mjs';
268 import { TwoTuple_u32TxOutZ } from '../structs/TwoTuple_u32TxOutZ.mjs';
269 import { TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ } from '../structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.mjs';
270 import { Balance } from '../structs/Balance.mjs';
271 import { TwoTuple_ThirtyTwoBytesChannelMonitorZ } from '../structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.mjs';
272 import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.mjs';
273 import { Type, TypeInterface } from '../structs/Type.mjs';
274 import { TwoTuple_PublicKeyTypeZ } from '../structs/TwoTuple_PublicKeyTypeZ.mjs';
275 import { InvoiceRequest } from '../structs/InvoiceRequest.mjs';
276 import { Bolt12Invoice } from '../structs/Bolt12Invoice.mjs';
277 import { InvoiceError } from '../structs/InvoiceError.mjs';
278 import { OffersMessage } from '../structs/OffersMessage.mjs';
279 import { Option_OffersMessageZ } from '../structs/Option_OffersMessageZ.mjs';
280 import { CustomOnionMessageContents, CustomOnionMessageContentsInterface } from '../structs/CustomOnionMessageContents.mjs';
281 import { Option_CustomOnionMessageContentsZ } from '../structs/Option_CustomOnionMessageContentsZ.mjs';
282 import { Result_COption_CustomOnionMessageContentsZDecodeErrorZ } from '../structs/Result_COption_CustomOnionMessageContentsZDecodeErrorZ.mjs';
283 import { Option_TypeZ } from '../structs/Option_TypeZ.mjs';
284 import { Result_COption_TypeZDecodeErrorZ } from '../structs/Result_COption_TypeZDecodeErrorZ.mjs';
285 import { Option_SocketAddressZ } from '../structs/Option_SocketAddressZ.mjs';
286 import { TwoTuple_PublicKeyCOption_SocketAddressZZ } from '../structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.mjs';
287 import { PeerHandleError } from '../structs/PeerHandleError.mjs';
288 import { Result_CVec_u8ZPeerHandleErrorZ } from '../structs/Result_CVec_u8ZPeerHandleErrorZ.mjs';
289 import { Result_NonePeerHandleErrorZ } from '../structs/Result_NonePeerHandleErrorZ.mjs';
290 import { Result_boolPeerHandleErrorZ } from '../structs/Result_boolPeerHandleErrorZ.mjs';
291 import { GraphSyncError } from '../structs/GraphSyncError.mjs';
292 import { Result_u32GraphSyncErrorZ } from '../structs/Result_u32GraphSyncErrorZ.mjs';
293 import { Result_CVec_u8ZIOErrorZ } from '../structs/Result_CVec_u8ZIOErrorZ.mjs';
294 import { Result_NoneIOErrorZ } from '../structs/Result_NoneIOErrorZ.mjs';
295 import { Result_CVec_StrZIOErrorZ } from '../structs/Result_CVec_StrZIOErrorZ.mjs';
296 import { Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.mjs';
297 import { Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ } from '../structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.mjs';
298 import { Option_SecretKeyZ } from '../structs/Option_SecretKeyZ.mjs';
299 import { VerifiedInvoiceRequest } from '../structs/VerifiedInvoiceRequest.mjs';
300 import { Result_VerifiedInvoiceRequestNoneZ } from '../structs/Result_VerifiedInvoiceRequestNoneZ.mjs';
301 import { Option_i64Z } from '../structs/Option_i64Z.mjs';
302 import { Result_SocketAddressDecodeErrorZ } from '../structs/Result_SocketAddressDecodeErrorZ.mjs';
303 import { Result_SocketAddressSocketAddressParseErrorZ } from '../structs/Result_SocketAddressSocketAddressParseErrorZ.mjs';
304 import { UpdateAddHTLC } from '../structs/UpdateAddHTLC.mjs';
305 import { UpdateFulfillHTLC } from '../structs/UpdateFulfillHTLC.mjs';
306 import { UpdateFailHTLC } from '../structs/UpdateFailHTLC.mjs';
307 import { UpdateFailMalformedHTLC } from '../structs/UpdateFailMalformedHTLC.mjs';
308 import { Result_AcceptChannelDecodeErrorZ } from '../structs/Result_AcceptChannelDecodeErrorZ.mjs';
309 import { Result_AcceptChannelV2DecodeErrorZ } from '../structs/Result_AcceptChannelV2DecodeErrorZ.mjs';
310 import { Result_TxAddInputDecodeErrorZ } from '../structs/Result_TxAddInputDecodeErrorZ.mjs';
311 import { Result_TxAddOutputDecodeErrorZ } from '../structs/Result_TxAddOutputDecodeErrorZ.mjs';
312 import { Result_TxRemoveInputDecodeErrorZ } from '../structs/Result_TxRemoveInputDecodeErrorZ.mjs';
313 import { Result_TxRemoveOutputDecodeErrorZ } from '../structs/Result_TxRemoveOutputDecodeErrorZ.mjs';
314 import { Result_TxCompleteDecodeErrorZ } from '../structs/Result_TxCompleteDecodeErrorZ.mjs';
315 import { Result_TxSignaturesDecodeErrorZ } from '../structs/Result_TxSignaturesDecodeErrorZ.mjs';
316 import { Result_TxInitRbfDecodeErrorZ } from '../structs/Result_TxInitRbfDecodeErrorZ.mjs';
317 import { Result_TxAckRbfDecodeErrorZ } from '../structs/Result_TxAckRbfDecodeErrorZ.mjs';
318 import { Result_TxAbortDecodeErrorZ } from '../structs/Result_TxAbortDecodeErrorZ.mjs';
319 import { Result_AnnouncementSignaturesDecodeErrorZ } from '../structs/Result_AnnouncementSignaturesDecodeErrorZ.mjs';
320 import { Result_ChannelReestablishDecodeErrorZ } from '../structs/Result_ChannelReestablishDecodeErrorZ.mjs';
321 import { Result_ClosingSignedDecodeErrorZ } from '../structs/Result_ClosingSignedDecodeErrorZ.mjs';
322 import { ClosingSignedFeeRange } from '../structs/ClosingSignedFeeRange.mjs';
323 import { Result_ClosingSignedFeeRangeDecodeErrorZ } from '../structs/Result_ClosingSignedFeeRangeDecodeErrorZ.mjs';
324 import { CommitmentSigned } from '../structs/CommitmentSigned.mjs';
325 import { Result_CommitmentSignedDecodeErrorZ } from '../structs/Result_CommitmentSignedDecodeErrorZ.mjs';
326 import { Result_FundingCreatedDecodeErrorZ } from '../structs/Result_FundingCreatedDecodeErrorZ.mjs';
327 import { Result_FundingSignedDecodeErrorZ } from '../structs/Result_FundingSignedDecodeErrorZ.mjs';
328 import { Result_ChannelReadyDecodeErrorZ } from '../structs/Result_ChannelReadyDecodeErrorZ.mjs';
329 import { Init } from '../structs/Init.mjs';
330 import { Result_InitDecodeErrorZ } from '../structs/Result_InitDecodeErrorZ.mjs';
331 import { Result_OpenChannelDecodeErrorZ } from '../structs/Result_OpenChannelDecodeErrorZ.mjs';
332 import { Result_OpenChannelV2DecodeErrorZ } from '../structs/Result_OpenChannelV2DecodeErrorZ.mjs';
333 import { Result_RevokeAndACKDecodeErrorZ } from '../structs/Result_RevokeAndACKDecodeErrorZ.mjs';
334 import { Result_ShutdownDecodeErrorZ } from '../structs/Result_ShutdownDecodeErrorZ.mjs';
335 import { Result_UpdateFailHTLCDecodeErrorZ } from '../structs/Result_UpdateFailHTLCDecodeErrorZ.mjs';
336 import { Result_UpdateFailMalformedHTLCDecodeErrorZ } from '../structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.mjs';
337 import { UpdateFee } from '../structs/UpdateFee.mjs';
338 import { Result_UpdateFeeDecodeErrorZ } from '../structs/Result_UpdateFeeDecodeErrorZ.mjs';
339 import { Result_UpdateFulfillHTLCDecodeErrorZ } from '../structs/Result_UpdateFulfillHTLCDecodeErrorZ.mjs';
340 import { Result_UpdateAddHTLCDecodeErrorZ } from '../structs/Result_UpdateAddHTLCDecodeErrorZ.mjs';
341 import { OnionMessage } from '../structs/OnionMessage.mjs';
342 import { Result_OnionMessageDecodeErrorZ } from '../structs/Result_OnionMessageDecodeErrorZ.mjs';
343 import { Ping } from '../structs/Ping.mjs';
344 import { Result_PingDecodeErrorZ } from '../structs/Result_PingDecodeErrorZ.mjs';
345 import { Pong } from '../structs/Pong.mjs';
346 import { Result_PongDecodeErrorZ } from '../structs/Result_PongDecodeErrorZ.mjs';
347 import { Result_UnsignedChannelAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.mjs';
348 import { Result_ChannelAnnouncementDecodeErrorZ } from '../structs/Result_ChannelAnnouncementDecodeErrorZ.mjs';
349 import { Result_UnsignedChannelUpdateDecodeErrorZ } from '../structs/Result_UnsignedChannelUpdateDecodeErrorZ.mjs';
350 import { Result_ChannelUpdateDecodeErrorZ } from '../structs/Result_ChannelUpdateDecodeErrorZ.mjs';
351 import { Result_ErrorMessageDecodeErrorZ } from '../structs/Result_ErrorMessageDecodeErrorZ.mjs';
352 import { Result_WarningMessageDecodeErrorZ } from '../structs/Result_WarningMessageDecodeErrorZ.mjs';
353 import { Result_UnsignedNodeAnnouncementDecodeErrorZ } from '../structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.mjs';
354 import { Result_NodeAnnouncementDecodeErrorZ } from '../structs/Result_NodeAnnouncementDecodeErrorZ.mjs';
355 import { Result_QueryShortChannelIdsDecodeErrorZ } from '../structs/Result_QueryShortChannelIdsDecodeErrorZ.mjs';
356 import { ReplyShortChannelIdsEnd } from '../structs/ReplyShortChannelIdsEnd.mjs';
357 import { Result_ReplyShortChannelIdsEndDecodeErrorZ } from '../structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.mjs';
358 import { Result_QueryChannelRangeDecodeErrorZ } from '../structs/Result_QueryChannelRangeDecodeErrorZ.mjs';
359 import { Result_ReplyChannelRangeDecodeErrorZ } from '../structs/Result_ReplyChannelRangeDecodeErrorZ.mjs';
360 import { Result_GossipTimestampFilterDecodeErrorZ } from '../structs/Result_GossipTimestampFilterDecodeErrorZ.mjs';
361 import { Bolt11Invoice } from '../structs/Bolt11Invoice.mjs';
362 import { SignOrCreationError } from '../structs/SignOrCreationError.mjs';
363 import { Result_Bolt11InvoiceSignOrCreationErrorZ } from '../structs/Result_Bolt11InvoiceSignOrCreationErrorZ.mjs';
364 import { Result_OffersMessageDecodeErrorZ } from '../structs/Result_OffersMessageDecodeErrorZ.mjs';
365 import { Option_HTLCClaimZ } from '../structs/Option_HTLCClaimZ.mjs';
366 import { CounterpartyCommitmentSecrets } from '../structs/CounterpartyCommitmentSecrets.mjs';
367 import { Result_CounterpartyCommitmentSecretsDecodeErrorZ } from '../structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.mjs';
368 import { TxCreationKeys } from '../structs/TxCreationKeys.mjs';
369 import { Result_TxCreationKeysDecodeErrorZ } from '../structs/Result_TxCreationKeysDecodeErrorZ.mjs';
370 import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs';
371 import { Result_HTLCOutputInCommitmentDecodeErrorZ } from '../structs/Result_HTLCOutputInCommitmentDecodeErrorZ.mjs';
372 import { CounterpartyChannelTransactionParameters } from '../structs/CounterpartyChannelTransactionParameters.mjs';
373 import { Result_CounterpartyChannelTransactionParametersDecodeErrorZ } from '../structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.mjs';
374 import { Result_ChannelTransactionParametersDecodeErrorZ } from '../structs/Result_ChannelTransactionParametersDecodeErrorZ.mjs';
375 import { Result_HolderCommitmentTransactionDecodeErrorZ } from '../structs/Result_HolderCommitmentTransactionDecodeErrorZ.mjs';
376 import { BuiltCommitmentTransaction } from '../structs/BuiltCommitmentTransaction.mjs';
377 import { Result_BuiltCommitmentTransactionDecodeErrorZ } from '../structs/Result_BuiltCommitmentTransactionDecodeErrorZ.mjs';
378 import { TrustedClosingTransaction } from '../structs/TrustedClosingTransaction.mjs';
379 import { Result_TrustedClosingTransactionNoneZ } from '../structs/Result_TrustedClosingTransactionNoneZ.mjs';
380 import { Result_CommitmentTransactionDecodeErrorZ } from '../structs/Result_CommitmentTransactionDecodeErrorZ.mjs';
381 import { TrustedCommitmentTransaction } from '../structs/TrustedCommitmentTransaction.mjs';
382 import { Result_TrustedCommitmentTransactionNoneZ } from '../structs/Result_TrustedCommitmentTransactionNoneZ.mjs';
383 import { Result_CVec_ECDSASignatureZNoneZ } from '../structs/Result_CVec_ECDSASignatureZNoneZ.mjs';
384 import { Option_usizeZ } from '../structs/Option_usizeZ.mjs';
385 import { Result_ShutdownScriptDecodeErrorZ } from '../structs/Result_ShutdownScriptDecodeErrorZ.mjs';
386 import { InvalidShutdownScript } from '../structs/InvalidShutdownScript.mjs';
387 import { Result_ShutdownScriptInvalidShutdownScriptZ } from '../structs/Result_ShutdownScriptInvalidShutdownScriptZ.mjs';
388 import { PaymentPurpose } from '../structs/PaymentPurpose.mjs';
389 import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurposeDecodeErrorZ.mjs';
390 import { ClaimedHTLC } from '../structs/ClaimedHTLC.mjs';
391 import { Result_ClaimedHTLCDecodeErrorZ } from '../structs/Result_ClaimedHTLCDecodeErrorZ.mjs';
392 import { PathFailure } from '../structs/PathFailure.mjs';
393 import { Option_PathFailureZ } from '../structs/Option_PathFailureZ.mjs';
394 import { Result_COption_PathFailureZDecodeErrorZ } from '../structs/Result_COption_PathFailureZDecodeErrorZ.mjs';
395 import { UntrustedString } from '../structs/UntrustedString.mjs';
396 import { ClosureReason } from '../structs/ClosureReason.mjs';
397 import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
398 import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
399 import { HTLCDestination } from '../structs/HTLCDestination.mjs';
400 import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
401 import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
402 import { Result_PaymentFailureReasonDecodeErrorZ } from '../structs/Result_PaymentFailureReasonDecodeErrorZ.mjs';
403 import { Option_U128Z } from '../structs/Option_U128Z.mjs';
404 import { Option_PaymentFailureReasonZ } from '../structs/Option_PaymentFailureReasonZ.mjs';
405 import { AnchorDescriptor } from '../structs/AnchorDescriptor.mjs';
406 import { BumpTransactionEvent } from '../structs/BumpTransactionEvent.mjs';
407 import { Event } from '../structs/Event.mjs';
408 import { Option_EventZ } from '../structs/Option_EventZ.mjs';
409 import { Result_COption_EventZDecodeErrorZ } from '../structs/Result_COption_EventZDecodeErrorZ.mjs';
410 import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs';
411 import { Result_SiPrefixBolt11ParseErrorZ } from '../structs/Result_SiPrefixBolt11ParseErrorZ.mjs';
412 import { ParseOrSemanticError } from '../structs/ParseOrSemanticError.mjs';
413 import { Result_Bolt11InvoiceParseOrSemanticErrorZ } from '../structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.mjs';
414 import { SignedRawBolt11Invoice } from '../structs/SignedRawBolt11Invoice.mjs';
415 import { Result_SignedRawBolt11InvoiceBolt11ParseErrorZ } from '../structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.mjs';
416 import { RawBolt11Invoice } from '../structs/RawBolt11Invoice.mjs';
417 import { Bolt11InvoiceSignature } from '../structs/Bolt11InvoiceSignature.mjs';
418 import { ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ } from '../structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.mjs';
419 import { PayeePubKey } from '../structs/PayeePubKey.mjs';
420 import { Result_PayeePubKeySecp256k1ErrorZ } from '../structs/Result_PayeePubKeySecp256k1ErrorZ.mjs';
421 import { PrivateRoute } from '../structs/PrivateRoute.mjs';
422 import { PositiveTimestamp } from '../structs/PositiveTimestamp.mjs';
423 import { Result_PositiveTimestampCreationErrorZ } from '../structs/Result_PositiveTimestampCreationErrorZ.mjs';
424 import { Result_NoneBolt11SemanticErrorZ } from '../structs/Result_NoneBolt11SemanticErrorZ.mjs';
425 import { Result_Bolt11InvoiceBolt11SemanticErrorZ } from '../structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.mjs';
426 import { Description } from '../structs/Description.mjs';
427 import { Result_DescriptionCreationErrorZ } from '../structs/Result_DescriptionCreationErrorZ.mjs';
428 import { Result_PrivateRouteCreationErrorZ } from '../structs/Result_PrivateRouteCreationErrorZ.mjs';
429 import { Result_OutPointDecodeErrorZ } from '../structs/Result_OutPointDecodeErrorZ.mjs';
430 import { BigSize } from '../structs/BigSize.mjs';
431 import { Result_BigSizeDecodeErrorZ } from '../structs/Result_BigSizeDecodeErrorZ.mjs';
432 import { Result_HostnameDecodeErrorZ } from '../structs/Result_HostnameDecodeErrorZ.mjs';
433 import { TransactionU16LenLimited } from '../structs/TransactionU16LenLimited.mjs';
434 import { Result_TransactionU16LenLimitedNoneZ } from '../structs/Result_TransactionU16LenLimitedNoneZ.mjs';
435 import { Result_TransactionU16LenLimitedDecodeErrorZ } from '../structs/Result_TransactionU16LenLimitedDecodeErrorZ.mjs';
436 import { Result_UntrustedStringDecodeErrorZ } from '../structs/Result_UntrustedStringDecodeErrorZ.mjs';
437 import { ReceiveTlvs } from '../structs/ReceiveTlvs.mjs';
438 import { Result_ReceiveTlvsDecodeErrorZ } from '../structs/Result_ReceiveTlvsDecodeErrorZ.mjs';
439 import { PaymentRelay } from '../structs/PaymentRelay.mjs';
440 import { Result_PaymentRelayDecodeErrorZ } from '../structs/Result_PaymentRelayDecodeErrorZ.mjs';
441 import { PaymentConstraints } from '../structs/PaymentConstraints.mjs';
442 import { Result_PaymentConstraintsDecodeErrorZ } from '../structs/Result_PaymentConstraintsDecodeErrorZ.mjs';
443 import { PaymentError } from '../structs/PaymentError.mjs';
444 import { Result_ThirtyTwoBytesPaymentErrorZ } from '../structs/Result_ThirtyTwoBytesPaymentErrorZ.mjs';
445 import { Result_NonePaymentErrorZ } from '../structs/Result_NonePaymentErrorZ.mjs';
446 import { ProbingError } from '../structs/ProbingError.mjs';
447 import { Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ } from '../structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ.mjs';
448 import { Result_StrSecp256k1ErrorZ } from '../structs/Result_StrSecp256k1ErrorZ.mjs';
449 import { OnionMessagePath } from '../structs/OnionMessagePath.mjs';
450 import { Result_OnionMessagePathNoneZ } from '../structs/Result_OnionMessagePathNoneZ.mjs';
451 import { TwoTuple_PublicKeyOnionMessageZ } from '../structs/TwoTuple_PublicKeyOnionMessageZ.mjs';
452 import { SendError } from '../structs/SendError.mjs';
453 import { Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ } from '../structs/Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ.mjs';
454 import { Result_NoneSendErrorZ } from '../structs/Result_NoneSendErrorZ.mjs';
455 import { Result_BlindedPathNoneZ } from '../structs/Result_BlindedPathNoneZ.mjs';
456 import { Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ } from '../structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.mjs';
457 import { Result_BlindedPathDecodeErrorZ } from '../structs/Result_BlindedPathDecodeErrorZ.mjs';
458 import { Result_BlindedHopDecodeErrorZ } from '../structs/Result_BlindedHopDecodeErrorZ.mjs';
459 import { Result_InvoiceErrorDecodeErrorZ } from '../structs/Result_InvoiceErrorDecodeErrorZ.mjs';
460 import { WatchedOutput } from '../structs/WatchedOutput.mjs';
461 import { Filter, FilterInterface } from '../structs/Filter.mjs';
462 import { Option_FilterZ } from '../structs/Option_FilterZ.mjs';
463 import { LockedChannelMonitor } from '../structs/LockedChannelMonitor.mjs';
464 import { Result_LockedChannelMonitorNoneZ } from '../structs/Result_LockedChannelMonitorNoneZ.mjs';
465 import { MonitorUpdateId } from '../structs/MonitorUpdateId.mjs';
466 import { TwoTuple_OutPointCVec_MonitorUpdateIdZZ } from '../structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.mjs';
467 import { KVStore, KVStoreInterface } from '../structs/KVStore.mjs';
468 import { ChannelUsage } from '../structs/ChannelUsage.mjs';
469 import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs';
470 import { ScoreLookUp, ScoreLookUpInterface } from '../structs/ScoreLookUp.mjs';
471 import { ScoreUpdate, ScoreUpdateInterface } from '../structs/ScoreUpdate.mjs';
472 import { LockableScore, LockableScoreInterface } from '../structs/LockableScore.mjs';
473 import { WriteableScore, WriteableScoreInterface } from '../structs/WriteableScore.mjs';
474 import { Persister, PersisterInterface } from '../structs/Persister.mjs';
475 import { MonitorUpdatingPersister } from '../structs/MonitorUpdatingPersister.mjs';
476 import { Persist, PersistInterface } from '../structs/Persist.mjs';
477 import { PrintableString } from '../structs/PrintableString.mjs';
478 import { FutureCallback, FutureCallbackInterface } from '../structs/FutureCallback.mjs';
479 import { Future } from '../structs/Future.mjs';
480 import { ChannelHandshakeConfig } from '../structs/ChannelHandshakeConfig.mjs';
481 import { ChannelHandshakeLimits } from '../structs/ChannelHandshakeLimits.mjs';
482 import { ChannelConfigUpdate } from '../structs/ChannelConfigUpdate.mjs';
483 import { UserConfig } from '../structs/UserConfig.mjs';
484 import { BestBlock } from '../structs/BestBlock.mjs';
485 import { Listen, ListenInterface } from '../structs/Listen.mjs';
486 import { Confirm, ConfirmInterface } from '../structs/Confirm.mjs';
487 import { ChainMonitor } from '../structs/ChainMonitor.mjs';
488 import { EventHandler, EventHandlerInterface } from '../structs/EventHandler.mjs';
489 import { EventsProvider, EventsProviderInterface } from '../structs/EventsProvider.mjs';
490 import { FailureCode } from '../structs/FailureCode.mjs';
491 import { ChainParameters } from '../structs/ChainParameters.mjs';
492 import { MessageSendEventsProvider, MessageSendEventsProviderInterface } from '../structs/MessageSendEventsProvider.mjs';
493 import { ChannelMessageHandler, ChannelMessageHandlerInterface } from '../structs/ChannelMessageHandler.mjs';
494 import { ChannelManagerReadArgs } from '../structs/ChannelManagerReadArgs.mjs';
495 import { ExpandedKey } from '../structs/ExpandedKey.mjs';
496 import { Packet } from '../structs/Packet.mjs';
497 import { RoutingMessageHandler, RoutingMessageHandlerInterface } from '../structs/RoutingMessageHandler.mjs';
498 import { OnionMessageProvider, OnionMessageProviderInterface } from '../structs/OnionMessageProvider.mjs';
499 import { OnionMessageHandler, OnionMessageHandlerInterface } from '../structs/OnionMessageHandler.mjs';
500 import { CustomMessageReader, CustomMessageReaderInterface } from '../structs/CustomMessageReader.mjs';
501 import { CustomMessageHandler, CustomMessageHandlerInterface } from '../structs/CustomMessageHandler.mjs';
502 import { IgnoringMessageHandler } from '../structs/IgnoringMessageHandler.mjs';
503 import { OffersMessageHandler, OffersMessageHandlerInterface } from '../structs/OffersMessageHandler.mjs';
504 import { CustomOnionMessageHandler, CustomOnionMessageHandlerInterface } from '../structs/CustomOnionMessageHandler.mjs';
505 import { ErroringMessageHandler } from '../structs/ErroringMessageHandler.mjs';
506 import { MessageHandler } from '../structs/MessageHandler.mjs';
507 import { SocketDescriptor, SocketDescriptorInterface } from '../structs/SocketDescriptor.mjs';
508 import { PeerManager } from '../structs/PeerManager.mjs';
509 import { DirectedChannelTransactionParameters } from '../structs/DirectedChannelTransactionParameters.mjs';
510 import { OfferFeatures } from '../structs/OfferFeatures.mjs';
511 import { InvoiceRequestFeatures } from '../structs/InvoiceRequestFeatures.mjs';
512 import { Amount } from '../structs/Amount.mjs';
513 import { Quantity } from '../structs/Quantity.mjs';
514 import { TaggedHash } from '../structs/TaggedHash.mjs';
515 import { ErroneousField } from '../structs/ErroneousField.mjs';
516 import { P2PGossipSync } from '../structs/P2PGossipSync.mjs';
517 import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
518 import { DirectedChannelInfo } from '../structs/DirectedChannelInfo.mjs';
519 import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs';
520 import { DefaultRouter } from '../structs/DefaultRouter.mjs';
521 import { ScorerAccountingForInFlightHtlcs } from '../structs/ScorerAccountingForInFlightHtlcs.mjs';
522 import { Payee } from '../structs/Payee.mjs';
523 import { Score, ScoreInterface } from '../structs/Score.mjs';
524 import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScore.mjs';
525 import { MultiThreadedScoreLockRead } from '../structs/MultiThreadedScoreLockRead.mjs';
526 import { MultiThreadedScoreLockWrite } from '../structs/MultiThreadedScoreLockWrite.mjs';
527 import { ProbabilisticScoringDecayParameters } from '../structs/ProbabilisticScoringDecayParameters.mjs';
528 import { KeysManager } from '../structs/KeysManager.mjs';
529 import { PhantomKeysManager } from '../structs/PhantomKeysManager.mjs';
530 import { Destination } from '../structs/Destination.mjs';
531 import { MessageRouter, MessageRouterInterface } from '../structs/MessageRouter.mjs';
532 import { OnionMessenger } from '../structs/OnionMessenger.mjs';
533 import { DefaultMessageRouter } from '../structs/DefaultMessageRouter.mjs';
534 import { OnionMessageContents } from '../structs/OnionMessageContents.mjs';
535 import { ForwardNode } from '../structs/ForwardNode.mjs';
536 import { ForwardTlvs } from '../structs/ForwardTlvs.mjs';
537 import { CoinSelectionSource, CoinSelectionSourceInterface } from '../structs/CoinSelectionSource.mjs';
538 import { WalletSource, WalletSourceInterface } from '../structs/WalletSource.mjs';
539 import { Wallet } from '../structs/Wallet.mjs';
540 import { BumpTransactionEventHandler } from '../structs/BumpTransactionEventHandler.mjs';
541 import { RapidGossipSync } from '../structs/RapidGossipSync.mjs';
542 import { GossipSync } from '../structs/GossipSync.mjs';
543 import { RawDataPart } from '../structs/RawDataPart.mjs';
544 import { Sha256 } from '../structs/Sha256.mjs';
545 import { ExpiryTime } from '../structs/ExpiryTime.mjs';
546 import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs';
547 import { Fallback } from '../structs/Fallback.mjs';
548
549 import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBase.mjs';
550 import * as bindings from '../bindings.mjs'
551
552
553 export class UtilMethods extends CommonBase {
554         /**
555          * Gets the 128-bit integer, as 16 little-endian bytes
556          */
557         public static constructor_U128_le_bytes(val: bigint): Uint8Array {
558                 const ret: number = bindings.U128_le_bytes(bindings.encodeUint128(val));
559                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
560                 return ret_conv;
561         }
562
563         /**
564          * Constructs a new U128 from 16 little-endian bytes
565          */
566         public static constructor_U128_new(le_bytes: Uint8Array): bigint {
567                 const ret: number = bindings.U128_new(bindings.encodeUint8Array(bindings.check_arr_len(le_bytes, 16)));
568                 const ret_conv: bigint = bindings.decodeUint128(ret);
569                 return ret_conv;
570         }
571
572         /**
573          * Constructs a new COption_NoneZ containing a
574          */
575         public static constructor_COption_NoneZ_some(): COption_NoneZ {
576                 const ret: COption_NoneZ = bindings.COption_NoneZ_some();
577                 return ret;
578         }
579
580         /**
581          * Constructs a new COption_NoneZ containing nothing
582          */
583         public static constructor_COption_NoneZ_none(): COption_NoneZ {
584                 const ret: COption_NoneZ = bindings.COption_NoneZ_none();
585                 return ret;
586         }
587
588         /**
589          * Read a APIError from a byte array, created by APIError_write
590          */
591         public static constructor_APIError_read(ser: Uint8Array): Result_COption_APIErrorZDecodeErrorZ {
592                 const ret: bigint = bindings.APIError_read(bindings.encodeUint8Array(ser));
593                 const ret_hu_conv: Result_COption_APIErrorZDecodeErrorZ = Result_COption_APIErrorZDecodeErrorZ.constr_from_ptr(ret);
594                 return ret_hu_conv;
595         }
596
597         /**
598          * Creates a digital signature of a message given a SecretKey, like the node's secret.
599          * 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.
600          * Signatures are EC recoverable, meaning that given the message and the signature the PublicKey of the signer can be extracted.
601          */
602         public static constructor_sign(msg: Uint8Array, sk: Uint8Array): Result_StrSecp256k1ErrorZ {
603                 const ret: bigint = bindings.sign(bindings.encodeUint8Array(msg), bindings.encodeUint8Array(bindings.check_arr_len(sk, 32)));
604                 const ret_hu_conv: Result_StrSecp256k1ErrorZ = Result_StrSecp256k1ErrorZ.constr_from_ptr(ret);
605                 return ret_hu_conv;
606         }
607
608         /**
609          * Recovers the PublicKey of the signer of the message given the message and the signature.
610          */
611         public static constructor_recover_pk(msg: Uint8Array, sig: string): Result_PublicKeySecp256k1ErrorZ {
612                 const ret: bigint = bindings.recover_pk(bindings.encodeUint8Array(msg), bindings.encodeString(sig));
613                 const ret_hu_conv: Result_PublicKeySecp256k1ErrorZ = Result_PublicKeySecp256k1ErrorZ.constr_from_ptr(ret);
614                 return ret_hu_conv;
615         }
616
617         /**
618          * Verifies a message was signed by a PrivateKey that derives to a given PublicKey, given a message, a signature,
619          * and the PublicKey.
620          */
621         public static constructor_verify(msg: Uint8Array, sig: string, pk: Uint8Array): boolean {
622                 const ret: boolean = bindings.verify(bindings.encodeUint8Array(msg), bindings.encodeString(sig), bindings.encodeUint8Array(bindings.check_arr_len(pk, 33)));
623                 return ret;
624         }
625
626         /**
627          * Construct the invoice's HRP and signatureless data into a preimage to be hashed.
628          */
629         public static constructor_construct_invoice_preimage(hrp_bytes: Uint8Array, data_without_signature: UInt5[]): Uint8Array {
630                 const ret: number = bindings.construct_invoice_preimage(bindings.encodeUint8Array(hrp_bytes), bindings.encodeUint8Array(data_without_signature != null ? bindings.uint5ArrToBytes(data_without_signature) : null));
631                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
632                 return ret_conv;
633         }
634
635         /**
636          * Read previously persisted [`ChannelMonitor`]s from the store.
637          */
638         public static constructor_read_channel_monitors(kv_store: KVStore, entropy_source: EntropySource, signer_provider: SignerProvider): Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
639                 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));
640                 const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret);
641                 CommonBase.add_ref_from(ret_hu_conv, kv_store);
642                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
643                 CommonBase.add_ref_from(ret_hu_conv, signer_provider);
644                 return ret_hu_conv;
645         }
646
647         /**
648          * Read a MonitorEvent from a byte array, created by MonitorEvent_write
649          */
650         public static constructor_MonitorEvent_read(ser: Uint8Array): Result_COption_MonitorEventZDecodeErrorZ {
651                 const ret: bigint = bindings.MonitorEvent_read(bindings.encodeUint8Array(ser));
652                 const ret_hu_conv: Result_COption_MonitorEventZDecodeErrorZ = Result_COption_MonitorEventZDecodeErrorZ.constr_from_ptr(ret);
653                 return ret_hu_conv;
654         }
655
656         /**
657          * Read a C2Tuple_ThirtyTwoBytesChannelMonitorZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelMonitorZ_write
658          */
659         public static constructor_C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(ser: Uint8Array, arg_a: EntropySource, arg_b: SignerProvider): Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
660                 const ret: bigint = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(bindings.encodeUint8Array(ser), CommonBase.get_ptr_of(arg_a), CommonBase.get_ptr_of(arg_b));
661                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
662                 CommonBase.add_ref_from(ret_hu_conv, arg_a);
663                 CommonBase.add_ref_from(ret_hu_conv, arg_b);
664                 return ret_hu_conv;
665         }
666
667         /**
668          * Fetches the set of [`InitFeatures`] flags which are provided by or required by
669          * [`ChannelManager`].
670          */
671         public static constructor_provided_init_features(config: UserConfig): InitFeatures {
672                 const ret: bigint = bindings.provided_init_features(config == null ? 0n : CommonBase.get_ptr_of(config));
673                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
674                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
675                 CommonBase.add_ref_from(ret_hu_conv, config);
676                 return ret_hu_conv;
677         }
678
679         /**
680          * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
681          */
682         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 {
683                 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)))));
684                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
685                 CommonBase.add_ref_from(ret_hu_conv, arg_entropy_source);
686                 CommonBase.add_ref_from(ret_hu_conv, arg_node_signer);
687                 CommonBase.add_ref_from(ret_hu_conv, arg_signer_provider);
688                 CommonBase.add_ref_from(ret_hu_conv, arg_fee_estimator);
689                 CommonBase.add_ref_from(ret_hu_conv, arg_chain_monitor);
690                 CommonBase.add_ref_from(ret_hu_conv, arg_tx_broadcaster);
691                 CommonBase.add_ref_from(ret_hu_conv, arg_router);
692                 CommonBase.add_ref_from(ret_hu_conv, arg_logger);
693                 CommonBase.add_ref_from(ret_hu_conv, arg_default_config);
694                 arg_channel_monitors.forEach((arg_channel_monitors_conv_16: ChannelMonitor) => { CommonBase.add_ref_from(ret_hu_conv, arg_channel_monitors_conv_16); });
695                 return ret_hu_conv;
696         }
697
698         /**
699          * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no
700          * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
701          * a `ChannelManager`.
702          * 
703          * `keys` is generated by calling [`NodeSigner::get_inbound_payment_key_material`] and then
704          * calling [`ExpandedKey::new`] with its result. It is recommended to cache this value and not
705          * regenerate it for each new inbound payment.
706          * 
707          * `current_time` is a Unix timestamp representing the current time.
708          * 
709          * Note that if `min_final_cltv_expiry_delta` is set to some value, then the payment will not be receivable
710          * on versions of LDK prior to 0.0.114.
711          * 
712          * [phantom node payments]: crate::sign::PhantomKeysManager
713          * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
714          */
715         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 {
716                 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));
717                 const ret_hu_conv: Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret);
718                 CommonBase.add_ref_from(ret_hu_conv, keys);
719                 CommonBase.add_ref_from(ret_hu_conv, min_value_msat);
720                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
721                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
722                 return ret_hu_conv;
723         }
724
725         /**
726          * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash`],
727          * but no `ChannelManager` is required. Useful for generating invoices for [phantom node payments]
728          * without a `ChannelManager`.
729          * 
730          * See [`create`] for information on the `keys` and `current_time` parameters.
731          * 
732          * Note that if `min_final_cltv_expiry_delta` is set to some value, then the payment will not be receivable
733          * on versions of LDK prior to 0.0.114.
734          * 
735          * [phantom node payments]: crate::sign::PhantomKeysManager
736          */
737         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 {
738                 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));
739                 const ret_hu_conv: Result_ThirtyTwoBytesNoneZ = Result_ThirtyTwoBytesNoneZ.constr_from_ptr(ret);
740                 CommonBase.add_ref_from(ret_hu_conv, keys);
741                 CommonBase.add_ref_from(ret_hu_conv, min_value_msat);
742                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
743                 return ret_hu_conv;
744         }
745
746         /**
747          * Parses an OnionV3 host and port into a [`SocketAddress::OnionV3`].
748          * 
749          * The host part must end with \".onion\".
750          */
751         public static constructor_parse_onion_address(host: string, port: number): Result_SocketAddressSocketAddressParseErrorZ {
752                 const ret: bigint = bindings.parse_onion_address(bindings.encodeString(host), port);
753                 const ret_hu_conv: Result_SocketAddressSocketAddressParseErrorZ = Result_SocketAddressSocketAddressParseErrorZ.constr_from_ptr(ret);
754                 return ret_hu_conv;
755         }
756
757         /**
758          * Gets the weight for an HTLC-Success transaction.
759          */
760         public static constructor_htlc_success_tx_weight(channel_type_features: ChannelTypeFeatures): bigint {
761                 const ret: bigint = bindings.htlc_success_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features));
762                 return ret;
763         }
764
765         /**
766          * Gets the weight for an HTLC-Timeout transaction.
767          */
768         public static constructor_htlc_timeout_tx_weight(channel_type_features: ChannelTypeFeatures): bigint {
769                 const ret: bigint = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0n : CommonBase.get_ptr_of(channel_type_features));
770                 return ret;
771         }
772
773         /**
774          * Check if a given input witness attempts to claim a HTLC.
775          */
776         public static constructor_HTLCClaim_from_witness(witness: Uint8Array): Option_HTLCClaimZ {
777                 const ret: bigint = bindings.HTLCClaim_from_witness(bindings.encodeUint8Array(witness));
778                 const ret_hu_conv: Option_HTLCClaimZ = Option_HTLCClaimZ.constr_from_ptr(ret);
779                 CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
780                 return ret_hu_conv;
781         }
782
783         /**
784          * Build the commitment secret from the seed and the commitment number
785          */
786         public static constructor_build_commitment_secret(commitment_seed: Uint8Array, idx: bigint): Uint8Array {
787                 const ret: number = bindings.build_commitment_secret(bindings.encodeUint8Array(bindings.check_arr_len(commitment_seed, 32)), idx);
788                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
789                 return ret_conv;
790         }
791
792         /**
793          * Build a closing transaction
794          */
795         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 {
796                 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));
797                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
798                 return ret_conv;
799         }
800
801         /**
802          * Derives a per-commitment-transaction private key (eg an htlc key or delayed_payment key)
803          * from the base secret and the per_commitment_point.
804          */
805         public static constructor_derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): Uint8Array {
806                 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)));
807                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
808                 return ret_conv;
809         }
810
811         /**
812          * Derives a per-commitment-transaction public key (eg an htlc key or a delayed_payment key)
813          * from the base point and the per_commitment_key. This is the public equivalent of
814          * derive_private_key - using only public keys to derive a public key instead of private keys.
815          */
816         public static constructor_derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): Uint8Array {
817                 const ret: number = bindings.derive_public_key(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), bindings.encodeUint8Array(bindings.check_arr_len(base_point, 33)));
818                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
819                 return ret_conv;
820         }
821
822         /**
823          * Derives a per-commitment-transaction revocation key from its constituent parts.
824          * 
825          * Only the cheating participant owns a valid witness to propagate a revoked
826          * commitment transaction, thus per_commitment_secret always come from cheater
827          * and revocation_base_secret always come from punisher, which is the broadcaster
828          * of the transaction spending with this key knowledge.
829          */
830         public static constructor_derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): Uint8Array {
831                 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)));
832                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
833                 return ret_conv;
834         }
835
836         /**
837          * Derives a per-commitment-transaction revocation public key from its constituent parts. This is
838          * the public equivalend of derive_private_revocation_key - using only public keys to derive a
839          * public key instead of private keys.
840          * 
841          * Only the cheating participant owns a valid witness to propagate a revoked
842          * commitment transaction, thus per_commitment_point always come from cheater
843          * and revocation_base_point always come from punisher, which is the broadcaster
844          * of the transaction spending with this key knowledge.
845          * 
846          * Note that this is infallible iff we trust that at least one of the two input keys are randomly
847          * generated (ie our own).
848          */
849         public static constructor_derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): Uint8Array {
850                 const ret: number = bindings.derive_public_revocation_key(bindings.encodeUint8Array(bindings.check_arr_len(per_commitment_point, 33)), bindings.encodeUint8Array(bindings.check_arr_len(countersignatory_revocation_base_point, 33)));
851                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
852                 return ret_conv;
853         }
854
855         /**
856          * A script either spendable by the revocation
857          * key or the broadcaster_delayed_payment_key and satisfying the relative-locktime OP_CSV constrain.
858          * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
859          */
860         public static constructor_get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
861                 const ret: number = bindings.get_revokeable_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(revocation_key, 33)), contest_delay, bindings.encodeUint8Array(bindings.check_arr_len(broadcaster_delayed_payment_key, 33)));
862                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
863                 return ret_conv;
864         }
865
866         /**
867          * Returns the script for the counterparty's output on a holder's commitment transaction based on
868          * the channel type.
869          */
870         public static constructor_get_counterparty_payment_script(channel_type_features: ChannelTypeFeatures, payment_key: Uint8Array): Uint8Array {
871                 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)));
872                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
873                 return ret_conv;
874         }
875
876         /**
877          * Gets the witness redeemscript for an HTLC output in a commitment transaction. Note that htlc
878          * does not need to have its previous_output_index filled.
879          */
880         public static constructor_get_htlc_redeemscript(htlc: HTLCOutputInCommitment, channel_type_features: ChannelTypeFeatures, keys: TxCreationKeys): Uint8Array {
881                 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));
882                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
883                 return ret_conv;
884         }
885
886         /**
887          * Gets the redeemscript for a funding output from the two funding public keys.
888          * Note that the order of funding public keys does not matter.
889          */
890         public static constructor_make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
891                 const ret: number = bindings.make_funding_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(broadcaster, 33)), bindings.encodeUint8Array(bindings.check_arr_len(countersignatory, 33)));
892                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
893                 return ret_conv;
894         }
895
896         /**
897          * Builds an unsigned HTLC-Success or HTLC-Timeout transaction from the given channel and HTLC
898          * parameters. This is used by [`TrustedCommitmentTransaction::get_htlc_sigs`] to fetch the
899          * transaction which needs signing, and can be used to construct an HTLC transaction which is
900          * broadcastable given a counterparty HTLC signature.
901          * 
902          * Panics if htlc.transaction_output_index.is_none() (as such HTLCs do not appear in the
903          * commitment transaction).
904          */
905         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: Uint8Array, revocation_key: Uint8Array): Uint8Array {
906                 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), bindings.encodeUint8Array(bindings.check_arr_len(broadcaster_delayed_payment_key, 33)), bindings.encodeUint8Array(bindings.check_arr_len(revocation_key, 33)));
907                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
908                 return ret_conv;
909         }
910
911         /**
912          * Returns the witness required to satisfy and spend a HTLC input.
913          */
914         public static constructor_build_htlc_input_witness(local_sig: Uint8Array, remote_sig: Uint8Array, preimage: Option_ThirtyTwoBytesZ, redeem_script: Uint8Array, channel_type_features: ChannelTypeFeatures): Uint8Array {
915                 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));
916                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
917                 return ret_conv;
918         }
919
920         /**
921          * Gets the witnessScript for the to_remote output when anchors are enabled.
922          */
923         public static constructor_get_to_countersignatory_with_anchors_redeemscript(payment_point: Uint8Array): Uint8Array {
924                 const ret: number = bindings.get_to_countersignatory_with_anchors_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(payment_point, 33)));
925                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
926                 return ret_conv;
927         }
928
929         /**
930          * Gets the witnessScript for an anchor output from the funding public key.
931          * The witness in the spending input must be:
932          * <BIP 143 funding_signature>
933          * After 16 blocks of confirmation, an alternative satisfying witness could be:
934          * <>
935          * (empty vector required to satisfy compliance with MINIMALIF-standard rule)
936          */
937         public static constructor_get_anchor_redeemscript(funding_pubkey: Uint8Array): Uint8Array {
938                 const ret: number = bindings.get_anchor_redeemscript(bindings.encodeUint8Array(bindings.check_arr_len(funding_pubkey, 33)));
939                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
940                 return ret_conv;
941         }
942
943         /**
944          * Returns the witness required to satisfy and spend an anchor input.
945          */
946         public static constructor_build_anchor_input_witness(funding_key: Uint8Array, funding_sig: Uint8Array): Uint8Array {
947                 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)));
948                 const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
949                 return ret_conv;
950         }
951
952         /**
953          * Commitment transaction numbers which appear in the transactions themselves are XOR'd with a
954          * shared secret first. This prevents on-chain observers from discovering how many commitment
955          * transactions occurred in a channel before it was closed.
956          * 
957          * This function gets the shared secret from relevant channel public keys and can be used to
958          * \"decrypt\" the commitment transaction number given a commitment transaction on-chain.
959          */
960         public static constructor_get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): bigint {
961                 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);
962                 return ret;
963         }
964
965         /**
966          * Read a NetworkUpdate from a byte array, created by NetworkUpdate_write
967          */
968         public static constructor_NetworkUpdate_read(ser: Uint8Array): Result_COption_NetworkUpdateZDecodeErrorZ {
969                 const ret: bigint = bindings.NetworkUpdate_read(bindings.encodeUint8Array(ser));
970                 const ret_hu_conv: Result_COption_NetworkUpdateZDecodeErrorZ = Result_COption_NetworkUpdateZDecodeErrorZ.constr_from_ptr(ret);
971                 return ret_hu_conv;
972         }
973
974         /**
975          * Verifies the signature of a [`NodeAnnouncement`].
976          * 
977          * Returns an error if it is invalid.
978          */
979         public static constructor_verify_node_announcement(msg: NodeAnnouncement): Result_NoneLightningErrorZ {
980                 const ret: bigint = bindings.verify_node_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg));
981                 const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret);
982                 CommonBase.add_ref_from(ret_hu_conv, msg);
983                 return ret_hu_conv;
984         }
985
986         /**
987          * Verifies all signatures included in a [`ChannelAnnouncement`].
988          * 
989          * Returns an error if one of the signatures is invalid.
990          */
991         public static constructor_verify_channel_announcement(msg: ChannelAnnouncement): Result_NoneLightningErrorZ {
992                 const ret: bigint = bindings.verify_channel_announcement(msg == null ? 0n : CommonBase.get_ptr_of(msg));
993                 const ret_hu_conv: Result_NoneLightningErrorZ = Result_NoneLightningErrorZ.constr_from_ptr(ret);
994                 CommonBase.add_ref_from(ret_hu_conv, msg);
995                 return ret_hu_conv;
996         }
997
998         /**
999          * Finds a route from us (payer) to the given target node (payee).
1000          * 
1001          * If the payee provided features in their invoice, they should be provided via the `payee` field
1002          * in the given [`RouteParameters::payment_params`].
1003          * Without this, MPP will only be used if the payee's features are available in the network graph.
1004          * 
1005          * Private routing paths between a public node and the target may be included in the `payee` field
1006          * of [`RouteParameters::payment_params`].
1007          * 
1008          * If some channels aren't announced, it may be useful to fill in `first_hops` with the results
1009          * from [`ChannelManager::list_usable_channels`]. If it is filled in, the view of these channels
1010          * from `network_graph` will be ignored, and only those in `first_hops` will be used.
1011          * 
1012          * The fees on channels from us to the next hop are ignored as they are assumed to all be equal.
1013          * However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` /
1014          * `htlc_maximum_msat` *are* checked as they may change based on the receiving node.
1015          * 
1016          * # Panics
1017          * 
1018          * Panics if first_hops contains channels without `short_channel_id`s;
1019          * [`ChannelManager::list_usable_channels`] will never include such channels.
1020          * 
1021          * [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
1022          * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
1023          * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
1024          * 
1025          * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
1026          */
1027         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 {
1028                 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)));
1029                 const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
1030                 CommonBase.add_ref_from(ret_hu_conv, route_params);
1031                 CommonBase.add_ref_from(ret_hu_conv, network_graph);
1032                 if (first_hops != null) { first_hops.forEach((first_hops_conv_16: ChannelDetails) => { CommonBase.add_ref_from(ret_hu_conv, first_hops_conv_16); }) };
1033                 CommonBase.add_ref_from(ret_hu_conv, logger);
1034                 CommonBase.add_ref_from(ret_hu_conv, scorer);
1035                 CommonBase.add_ref_from(ret_hu_conv, score_params);
1036                 return ret_hu_conv;
1037         }
1038
1039         /**
1040          * Construct a route from us (payer) to the target node (payee) via the given hops (which should
1041          * exclude the payer, but include the payee). This may be useful, e.g., for probing the chosen path.
1042          * 
1043          * Re-uses logic from `find_route`, so the restrictions described there also apply here.
1044          */
1045         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 {
1046                 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)));
1047                 const ret_hu_conv: Result_RouteLightningErrorZ = Result_RouteLightningErrorZ.constr_from_ptr(ret);
1048                 CommonBase.add_ref_from(ret_hu_conv, route_params);
1049                 CommonBase.add_ref_from(ret_hu_conv, network_graph);
1050                 CommonBase.add_ref_from(ret_hu_conv, logger);
1051                 return ret_hu_conv;
1052         }
1053
1054         /**
1055          * Creates an unsigned [`PartiallySignedTransaction`] which spends the given descriptors to
1056          * the given outputs, plus an output to the given change destination (if sufficient
1057          * change value remains). The PSBT will have a feerate, at least, of the given value.
1058          * 
1059          * The `locktime` argument is used to set the transaction's locktime. If `None`, the
1060          * transaction will have a locktime of 0. It it recommended to set this to the current block
1061          * height to avoid fee sniping, unless you have some specific reason to use a different
1062          * locktime.
1063          * 
1064          * Returns the PSBT and expected max transaction weight.
1065          * 
1066          * Returns `Err(())` if the output value is greater than the input value minus required fee,
1067          * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
1068          * does not match the one we can spend.
1069          * 
1070          * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
1071          */
1072         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_u8ZusizeZNoneZ {
1073                 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));
1074                 const ret_hu_conv: Result_C2Tuple_CVec_u8ZusizeZNoneZ = Result_C2Tuple_CVec_u8ZusizeZNoneZ.constr_from_ptr(ret);
1075                 descriptors.forEach((descriptors_conv_27: SpendableOutputDescriptor) => { CommonBase.add_ref_from(ret_hu_conv, descriptors_conv_27); });
1076                 CommonBase.add_ref_from(ret_hu_conv, locktime);
1077                 return ret_hu_conv;
1078         }
1079
1080         /**
1081          * Create an onion message with contents `message` to the destination of `path`.
1082          * Returns (introduction_node_id, onion_msg)
1083          * 
1084          * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
1085          */
1086         public static constructor_create_onion_message(entropy_source: EntropySource, node_signer: NodeSigner, path: OnionMessagePath, message: OnionMessageContents, reply_path: BlindedPath|null): Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ {
1087                 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(message), reply_path == null ? 0n : CommonBase.get_ptr_of(reply_path));
1088                 const ret_hu_conv: Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ = Result_C2Tuple_PublicKeyOnionMessageZSendErrorZ.constr_from_ptr(ret);
1089                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1090                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1091                 CommonBase.add_ref_from(ret_hu_conv, path);
1092                 CommonBase.add_ref_from(ret_hu_conv, message);
1093                 CommonBase.add_ref_from(ret_hu_conv, reply_path);
1094                 return ret_hu_conv;
1095         }
1096
1097         /**
1098          * Returns whether `tlv_type` corresponds to a TLV record for Offers.
1099          */
1100         public static constructor_OffersMessage_is_known_type(tlv_type: bigint): boolean {
1101                 const ret: boolean = bindings.OffersMessage_is_known_type(tlv_type);
1102                 return ret;
1103         }
1104
1105         /**
1106          * Create a one-hop blinded path for a payment.
1107          */
1108         public static constructor_BlindedPath_one_hop_for_payment(payee_node_id: Uint8Array, payee_tlvs: ReceiveTlvs, entropy_source: EntropySource): Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ {
1109                 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));
1110                 const ret_hu_conv: Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
1111                 CommonBase.add_ref_from(ret_hu_conv, payee_tlvs);
1112                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1113                 return ret_hu_conv;
1114         }
1115
1116         /**
1117          * Read a PathFailure from a byte array, created by PathFailure_write
1118          */
1119         public static constructor_PathFailure_read(ser: Uint8Array): Result_COption_PathFailureZDecodeErrorZ {
1120                 const ret: bigint = bindings.PathFailure_read(bindings.encodeUint8Array(ser));
1121                 const ret_hu_conv: Result_COption_PathFailureZDecodeErrorZ = Result_COption_PathFailureZDecodeErrorZ.constr_from_ptr(ret);
1122                 return ret_hu_conv;
1123         }
1124
1125         /**
1126          * Read a ClosureReason from a byte array, created by ClosureReason_write
1127          */
1128         public static constructor_ClosureReason_read(ser: Uint8Array): Result_COption_ClosureReasonZDecodeErrorZ {
1129                 const ret: bigint = bindings.ClosureReason_read(bindings.encodeUint8Array(ser));
1130                 const ret_hu_conv: Result_COption_ClosureReasonZDecodeErrorZ = Result_COption_ClosureReasonZDecodeErrorZ.constr_from_ptr(ret);
1131                 return ret_hu_conv;
1132         }
1133
1134         /**
1135          * Read a HTLCDestination from a byte array, created by HTLCDestination_write
1136          */
1137         public static constructor_HTLCDestination_read(ser: Uint8Array): Result_COption_HTLCDestinationZDecodeErrorZ {
1138                 const ret: bigint = bindings.HTLCDestination_read(bindings.encodeUint8Array(ser));
1139                 const ret_hu_conv: Result_COption_HTLCDestinationZDecodeErrorZ = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret);
1140                 return ret_hu_conv;
1141         }
1142
1143         /**
1144          * Read a Event from a byte array, created by Event_write
1145          */
1146         public static constructor_Event_read(ser: Uint8Array): Result_COption_EventZDecodeErrorZ {
1147                 const ret: bigint = bindings.Event_read(bindings.encodeUint8Array(ser));
1148                 const ret_hu_conv: Result_COption_EventZDecodeErrorZ = Result_COption_EventZDecodeErrorZ.constr_from_ptr(ret);
1149                 return ret_hu_conv;
1150         }
1151
1152         /**
1153          * Pays the given [`Bolt11Invoice`], retrying if needed based on [`Retry`].
1154          * 
1155          * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
1156          * as the payment is still pending. If the payment succeeds, you must ensure that a second payment
1157          * with the same [`PaymentHash`] is never sent.
1158          * 
1159          * If you wish to use a different payment idempotency token, see [`pay_invoice_with_id`].
1160          */
1161         public static constructor_pay_invoice(invoice: Bolt11Invoice, retry_strategy: Retry, channelmanager: ChannelManager): Result_ThirtyTwoBytesPaymentErrorZ {
1162                 const ret: bigint = bindings.pay_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
1163                 const ret_hu_conv: Result_ThirtyTwoBytesPaymentErrorZ = Result_ThirtyTwoBytesPaymentErrorZ.constr_from_ptr(ret);
1164                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1165                 CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
1166                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1167                 return ret_hu_conv;
1168         }
1169
1170         /**
1171          * Pays the given [`Bolt11Invoice`] with a custom idempotency key, retrying if needed based on
1172          * [`Retry`].
1173          * 
1174          * Note that idempotency is only guaranteed as long as the payment is still pending. Once the
1175          * payment completes or fails, no idempotency guarantees are made.
1176          * 
1177          * You should ensure that the [`Bolt11Invoice::payment_hash`] is unique and the same
1178          * [`PaymentHash`] has never been paid before.
1179          * 
1180          * See [`pay_invoice`] for a variant which uses the [`PaymentHash`] for the idempotency token.
1181          */
1182         public static constructor_pay_invoice_with_id(invoice: Bolt11Invoice, payment_id: Uint8Array, retry_strategy: Retry, channelmanager: ChannelManager): Result_NonePaymentErrorZ {
1183                 const ret: bigint = bindings.pay_invoice_with_id(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
1184                 const ret_hu_conv: Result_NonePaymentErrorZ = Result_NonePaymentErrorZ.constr_from_ptr(ret);
1185                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1186                 CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
1187                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1188                 return ret_hu_conv;
1189         }
1190
1191         /**
1192          * Pays the given zero-value [`Bolt11Invoice`] using the given amount, retrying if needed based on
1193          * [`Retry`].
1194          * 
1195          * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
1196          * as the payment is still pending. If the payment succeeds, you must ensure that a second payment
1197          * with the same [`PaymentHash`] is never sent.
1198          * 
1199          * If you wish to use a different payment idempotency token, see
1200          * [`pay_zero_value_invoice_with_id`].
1201          */
1202         public static constructor_pay_zero_value_invoice(invoice: Bolt11Invoice, amount_msats: bigint, retry_strategy: Retry, channelmanager: ChannelManager): Result_ThirtyTwoBytesPaymentErrorZ {
1203                 const ret: bigint = bindings.pay_zero_value_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msats, CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
1204                 const ret_hu_conv: Result_ThirtyTwoBytesPaymentErrorZ = Result_ThirtyTwoBytesPaymentErrorZ.constr_from_ptr(ret);
1205                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1206                 CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
1207                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1208                 return ret_hu_conv;
1209         }
1210
1211         /**
1212          * Pays the given zero-value [`Bolt11Invoice`] using the given amount and custom idempotency key,
1213          * retrying if needed based on [`Retry`].
1214          * 
1215          * Note that idempotency is only guaranteed as long as the payment is still pending. Once the
1216          * payment completes or fails, no idempotency guarantees are made.
1217          * 
1218          * You should ensure that the [`Bolt11Invoice::payment_hash`] is unique and the same
1219          * [`PaymentHash`] has never been paid before.
1220          * 
1221          * See [`pay_zero_value_invoice`] for a variant which uses the [`PaymentHash`] for the
1222          * idempotency token.
1223          */
1224         public static constructor_pay_zero_value_invoice_with_id(invoice: Bolt11Invoice, amount_msats: bigint, payment_id: Uint8Array, retry_strategy: Retry, channelmanager: ChannelManager): Result_NonePaymentErrorZ {
1225                 const ret: bigint = bindings.pay_zero_value_invoice_with_id(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msats, bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32)), CommonBase.get_ptr_of(retry_strategy), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager));
1226                 const ret_hu_conv: Result_NonePaymentErrorZ = Result_NonePaymentErrorZ.constr_from_ptr(ret);
1227                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1228                 CommonBase.add_ref_from(ret_hu_conv, retry_strategy);
1229                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1230                 return ret_hu_conv;
1231         }
1232
1233         /**
1234          * Sends payment probes over all paths of a route that would be used to pay the given invoice.
1235          * 
1236          * See [`ChannelManager::send_preflight_probes`] for more information.
1237          */
1238         public static constructor_preflight_probe_invoice(invoice: Bolt11Invoice, channelmanager: ChannelManager, liquidity_limit_multiplier: Option_u64Z): Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ {
1239                 const ret: bigint = bindings.preflight_probe_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(liquidity_limit_multiplier));
1240                 const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ.constr_from_ptr(ret);
1241                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1242                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1243                 CommonBase.add_ref_from(ret_hu_conv, liquidity_limit_multiplier);
1244                 return ret_hu_conv;
1245         }
1246
1247         /**
1248          * Sends payment probes over all paths of a route that would be used to pay the given zero-value
1249          * invoice using the given amount.
1250          * 
1251          * See [`ChannelManager::send_preflight_probes`] for more information.
1252          */
1253         public static constructor_preflight_probe_zero_value_invoice(invoice: Bolt11Invoice, amount_msat: bigint, channelmanager: ChannelManager, liquidity_limit_multiplier: Option_u64Z): Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ {
1254                 const ret: bigint = bindings.preflight_probe_zero_value_invoice(invoice == null ? 0n : CommonBase.get_ptr_of(invoice), amount_msat, channelmanager == null ? 0n : CommonBase.get_ptr_of(channelmanager), CommonBase.get_ptr_of(liquidity_limit_multiplier));
1255                 const ret_hu_conv: Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbingErrorZ.constr_from_ptr(ret);
1256                 CommonBase.add_ref_from(ret_hu_conv, invoice);
1257                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1258                 CommonBase.add_ref_from(ret_hu_conv, liquidity_limit_multiplier);
1259                 return ret_hu_conv;
1260         }
1261
1262         /**
1263          * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
1264          * See [`PhantomKeysManager`] for more information on phantom node payments.
1265          * 
1266          * `phantom_route_hints` parameter:
1267          * Contains channel info for all nodes participating in the phantom invoice
1268          * Entries are retrieved from a call to [`ChannelManager::get_phantom_route_hints`] on each
1269          * participating node
1270          * It is fine to cache `phantom_route_hints` and reuse it across invoices, as long as the data is
1271          * updated when a channel becomes disabled or closes
1272          * Note that if too many channels are included in [`PhantomRouteHints::channels`], the invoice
1273          * may be too long for QR code scanning. To fix this, `PhantomRouteHints::channels` may be pared
1274          * down
1275          * 
1276          * `payment_hash` can be specified if you have a specific need for a custom payment hash (see the difference
1277          * between [`ChannelManager::create_inbound_payment`] and [`ChannelManager::create_inbound_payment_for_hash`]).
1278          * If `None` is provided for `payment_hash`, then one will be created.
1279          * 
1280          * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
1281          * in excess of the current time.
1282          * 
1283          * `duration_since_epoch` is the current time since epoch in seconds.
1284          * 
1285          * You can specify a custom `min_final_cltv_expiry_delta`, or let LDK default it to
1286          * [`MIN_FINAL_CLTV_EXPIRY_DELTA`]. The provided expiry must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`] - 3.
1287          * Note that LDK will add a buffer of 3 blocks to the delta to allow for up to a few new block
1288          * confirmations during routing.
1289          * 
1290          * Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
1291          * invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
1292          * requirement).
1293          * 
1294          * [`PhantomKeysManager`]: lightning::sign::PhantomKeysManager
1295          * [`ChannelManager::get_phantom_route_hints`]: lightning::ln::channelmanager::ChannelManager::get_phantom_route_hints
1296          * [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
1297          * [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
1298          * [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
1299          * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
1300          * 
1301          * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1302          * available and the current time is supplied by the caller.
1303          */
1304         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 {
1305                 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);
1306                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1307                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1308                 CommonBase.add_ref_from(ret_hu_conv, payment_hash);
1309                 phantom_route_hints.forEach((phantom_route_hints_conv_19: PhantomRouteHints) => { CommonBase.add_ref_from(ret_hu_conv, phantom_route_hints_conv_19); });
1310                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1311                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1312                 CommonBase.add_ref_from(ret_hu_conv, logger);
1313                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1314                 return ret_hu_conv;
1315         }
1316
1317         /**
1318          * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
1319          * See [`PhantomKeysManager`] for more information on phantom node payments.
1320          * 
1321          * `phantom_route_hints` parameter:
1322          * Contains channel info for all nodes participating in the phantom invoice
1323          * Entries are retrieved from a call to [`ChannelManager::get_phantom_route_hints`] on each
1324          * participating node
1325          * It is fine to cache `phantom_route_hints` and reuse it across invoices, as long as the data is
1326          * updated when a channel becomes disabled or closes
1327          * Note that the route hints generated from `phantom_route_hints` will be limited to a maximum
1328          * of 3 hints to ensure that the invoice can be scanned in a QR code. These hints are selected
1329          * in the order that the nodes in `PhantomRouteHints` are specified, selecting one hint per node
1330          * until the maximum is hit. Callers may provide as many `PhantomRouteHints::channels` as
1331          * desired, but note that some nodes will be trimmed if more than 3 nodes are provided.
1332          * 
1333          * `description_hash` is a SHA-256 hash of the description text
1334          * 
1335          * `payment_hash` can be specified if you have a specific need for a custom payment hash (see the difference
1336          * between [`ChannelManager::create_inbound_payment`] and [`ChannelManager::create_inbound_payment_for_hash`]).
1337          * If `None` is provided for `payment_hash`, then one will be created.
1338          * 
1339          * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for
1340          * in excess of the current time.
1341          * 
1342          * `duration_since_epoch` is the current time since epoch in seconds.
1343          * 
1344          * Note that the provided `keys_manager`'s `NodeSigner` implementation must support phantom
1345          * invoices in its `sign_invoice` implementation ([`PhantomKeysManager`] satisfies this
1346          * requirement).
1347          * 
1348          * [`PhantomKeysManager`]: lightning::sign::PhantomKeysManager
1349          * [`ChannelManager::get_phantom_route_hints`]: lightning::ln::channelmanager::ChannelManager::get_phantom_route_hints
1350          * [`ChannelManager::create_inbound_payment`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment
1351          * [`ChannelManager::create_inbound_payment_for_hash`]: lightning::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
1352          * [`PhantomRouteHints::channels`]: lightning::ln::channelmanager::PhantomRouteHints::channels
1353          * 
1354          * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1355          * available and the current time is supplied by the caller.
1356          */
1357         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 {
1358                 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);
1359                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1360                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1361                 CommonBase.add_ref_from(ret_hu_conv, payment_hash);
1362                 CommonBase.add_ref_from(ret_hu_conv, description_hash);
1363                 phantom_route_hints.forEach((phantom_route_hints_conv_19: PhantomRouteHints) => { CommonBase.add_ref_from(ret_hu_conv, phantom_route_hints_conv_19); });
1364                 CommonBase.add_ref_from(ret_hu_conv, entropy_source);
1365                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1366                 CommonBase.add_ref_from(ret_hu_conv, logger);
1367                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1368                 return ret_hu_conv;
1369         }
1370
1371         /**
1372          * See [`create_invoice_from_channelmanager_with_description_hash`]
1373          * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1374          * available and the current time is supplied by the caller.
1375          */
1376         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 {
1377                 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));
1378                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1379                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1380                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1381                 CommonBase.add_ref_from(ret_hu_conv, logger);
1382                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1383                 CommonBase.add_ref_from(ret_hu_conv, description_hash);
1384                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1385                 return ret_hu_conv;
1386         }
1387
1388         /**
1389          * See [`create_invoice_from_channelmanager`]
1390          * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
1391          * available and the current time is supplied by the caller.
1392          */
1393         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 {
1394                 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));
1395                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1396                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1397                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1398                 CommonBase.add_ref_from(ret_hu_conv, logger);
1399                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1400                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1401                 return ret_hu_conv;
1402         }
1403
1404         /**
1405          * See [`create_invoice_from_channelmanager_and_duration_since_epoch`]
1406          * This version allows for providing a custom [`PaymentHash`] for the invoice.
1407          * This may be useful if you're building an on-chain swap or involving another protocol where
1408          * the payment hash is also involved outside the scope of lightning.
1409          */
1410         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 {
1411                 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));
1412                 const ret_hu_conv: Result_Bolt11InvoiceSignOrCreationErrorZ = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
1413                 CommonBase.add_ref_from(ret_hu_conv, channelmanager);
1414                 CommonBase.add_ref_from(ret_hu_conv, node_signer);
1415                 CommonBase.add_ref_from(ret_hu_conv, logger);
1416                 CommonBase.add_ref_from(ret_hu_conv, amt_msat);
1417                 CommonBase.add_ref_from(ret_hu_conv, min_final_cltv_expiry_delta);
1418                 return ret_hu_conv;
1419         }
1420
1421 }