UNPKG

lightningdevkit

Version:
29 lines (28 loc) 1.37 kB
import { Logger } from '../structs/Logger.mjs'; import { NetworkGraph } from '../structs/NetworkGraph.mjs'; import { EntropySource } from '../structs/EntropySource.mjs'; import { Router } from '../structs/Router.mjs'; import { ProbabilisticScoringFeeParameters } from '../structs/ProbabilisticScoringFeeParameters.mjs'; import { LockableScore } from '../structs/LockableScore.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * A [`Router`] implemented using [`find_route`]. * * # Privacy * * Creating [`BlindedPaymentPath`]s may affect privacy since, if a suitable path cannot be found, * it will create a one-hop path using the recipient as the introduction node if it is a announced * node. Otherwise, there is no way to find a path to the introduction node in order to send a * payment, and thus an `Err` is returned. */ export declare class DefaultRouter extends CommonBase { /** * Creates a new router. */ static constructor_new(network_graph: NetworkGraph, logger: Logger, entropy_source: EntropySource, scorer: LockableScore, score_params: ProbabilisticScoringFeeParameters): DefaultRouter; /** * Constructs a new Router which calls the relevant methods on this_arg. * This copies the `inner` pointer in this_arg and thus the returned Router must be freed before this_arg is */ as_Router(): Router; }