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