import { Option_C2Tuple_usizeTransactionZZ } from '../structs/Option_C2Tuple_usizeTransactionZZ.mjs';
import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
import { Record } from '../structs/Record.mjs';
import { Logger, LoggerInterface } from '../structs/Logger.mjs';
import { NetworkGraph } from '../structs/NetworkGraph.mjs';
import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
-import { NodeId } from '../structs/NodeId.mjs';
import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
import { Access, AccessInterface } from '../structs/Access.mjs';
import { NetAddress } from '../structs/NetAddress.mjs';
import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
import { NodeInfo } from '../structs/NodeInfo.mjs';
import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
bindings.ProbabilisticScorer_debug_log_liquidity_stats(this.ptr);
}
+ /**
+ * Query the estimated minimum and maximum liquidity available for sending a payment over the
+ * channel with `scid` towards the given `target` node.
+ */
+ public estimated_channel_liquidity_range(scid: bigint, target: NodeId): Option_C2Tuple_u64u64ZZ {
+ const ret: number = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0 : CommonBase.get_ptr_of(target) & ~1);
+ const ret_hu_conv: Option_C2Tuple_u64u64ZZ = Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ CommonBase.add_ref_from(this, target);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Marks the node with the given `node_id` as banned, i.e.,
+ * it will be avoided during path finding.
+ */
+ public add_banned(node_id: NodeId): void {
+ bindings.ProbabilisticScorer_add_banned(this.ptr, node_id == null ? 0 : CommonBase.get_ptr_of(node_id) & ~1);
+ CommonBase.add_ref_from(this, node_id);
+ }
+
+ /**
+ * Removes the node with the given `node_id` from the list of nodes to avoid.
+ */
+ public remove_banned(node_id: NodeId): void {
+ bindings.ProbabilisticScorer_remove_banned(this.ptr, node_id == null ? 0 : CommonBase.get_ptr_of(node_id) & ~1);
+ CommonBase.add_ref_from(this, node_id);
+ }
+
+ /**
+ * Clears the list of nodes that are avoided during path finding.
+ */
+ public clear_banned(): void {
+ bindings.ProbabilisticScorer_clear_banned(this.ptr);
+ }
+
/**
* Constructs a new Score which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is