[TS] Update auto-generated TS bindings
[ldk-java] / ts / structs / ProbabilisticScorer.mts
index 65c97464a990411d14e60c8136e720b1b057f61c..d2d0e989c66f7ccc80aade61f8125c86fb9e8a8f 100644 (file)
@@ -108,6 +108,9 @@ import { TwoTuple_OutPointCVec_MonitorEventZZ } from '../structs/TwoTuple_OutPoi
 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';
@@ -121,7 +124,6 @@ import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesD
 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';
@@ -138,6 +140,8 @@ import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDec
 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';
@@ -401,6 +405,42 @@ export class ProbabilisticScorer extends CommonBase {
                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