X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FFeeEstimator.mts;h=f201fb1ea9cc0945aa63689c4a70c14637774136;hb=31a1b84c2ca25db2978865e9ca9573974f79cc79;hp=8bf8cbf6f76f602efaab75564f25d42843b6fada;hpb=4713fdb1c6821681d17ecde031b77eb43db1308b;p=ldk-java diff --git a/ts/structs/FeeEstimator.mts b/ts/structs/FeeEstimator.mts index 8bf8cbf6..f201fb1e 100644 --- a/ts/structs/FeeEstimator.mts +++ b/ts/structs/FeeEstimator.mts @@ -67,6 +67,9 @@ import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurp import { ClosureReason } from '../structs/ClosureReason.mjs'; import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs'; import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs'; +import { HTLCDestination } from '../structs/HTLCDestination.mjs'; +import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs'; +import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs'; import { ChannelUpdate } from '../structs/ChannelUpdate.mjs'; import { NetworkUpdate } from '../structs/NetworkUpdate.mjs'; import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs'; @@ -104,7 +107,7 @@ import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransaction import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs'; import { HTLCUpdate } from '../structs/HTLCUpdate.mjs'; import { MonitorEvent } from '../structs/MonitorEvent.mjs'; -import { TwoTuple_OutPointCVec_MonitorEventZZ } from '../structs/TwoTuple_OutPointCVec_MonitorEventZZ.mjs'; +import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs'; import { Option_C2Tuple_usizeTransactionZZ } from '../structs/Option_C2Tuple_usizeTransactionZZ.mjs'; import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs'; import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs'; @@ -138,6 +141,7 @@ import { ChannelInfo } from '../structs/ChannelInfo.mjs'; import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs'; import { RoutingFees } from '../structs/RoutingFees.mjs'; import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs'; +import { Hostname } from '../structs/Hostname.mjs'; import { NetAddress } from '../structs/NetAddress.mjs'; import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs'; import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs'; @@ -358,12 +362,12 @@ import * as bindings from '../bindings.mjs' export interface FeeEstimatorInterface { /**Gets estimated satoshis of fee required per 1000 Weight-Units. * - * Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later - * round-downs don't put us below 1 satoshi-per-byte). + * LDK will wrap this method and ensure that the value returned is no smaller than 253 + * (ie 1 satoshi-per-byte rounded up to ensure later round-downs don't put us below 1 satoshi-per-byte). * - * This method can be implemented with the following unit conversions: - * max(satoshis-per-byte * 250, 253) - * max(satoshis-per-kbyte / 4, 253) + * The following unit conversions can be used to convert to sats/KW: + * satoshis-per-byte * 250 + * satoshis-per-kbyte / 4 */ get_est_sat_per_1000_weight(confirmation_target: ConfirmationTarget): number; } @@ -384,7 +388,7 @@ export class FeeEstimator extends CommonBase { public bindings_instance?: bindings.LDKFeeEstimator; /* @internal */ - constructor(_dummy: object, ptr: number) { + constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.FeeEstimator_free); this.bindings_instance = null; } @@ -398,7 +402,7 @@ export class FeeEstimator extends CommonBase { return ret; }, } as bindings.LDKFeeEstimator; - const ptr: number = bindings.LDKFeeEstimator_new(structImplementation); + const ptr: bigint = bindings.LDKFeeEstimator_new(structImplementation); impl_holder.held = new FeeEstimator(null, ptr); impl_holder.held.bindings_instance = structImplementation; @@ -408,12 +412,12 @@ export class FeeEstimator extends CommonBase { /** * Gets estimated satoshis of fee required per 1000 Weight-Units. * - * Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later - * round-downs don't put us below 1 satoshi-per-byte). + * LDK will wrap this method and ensure that the value returned is no smaller than 253 + * (ie 1 satoshi-per-byte rounded up to ensure later round-downs don't put us below 1 satoshi-per-byte). * - * This method can be implemented with the following unit conversions: - * max(satoshis-per-byte * 250, 253) - * max(satoshis-per-kbyte / 4, 253) + * The following unit conversions can be used to convert to sats/KW: + * satoshis-per-byte * 250 + * satoshis-per-kbyte / 4 */ public get_est_sat_per_1000_weight(confirmation_target: ConfirmationTarget): number { const ret: number = bindings.FeeEstimator_get_est_sat_per_1000_weight(this.ptr, confirmation_target);