Interface ChannelManagerConstructor.RouterWrapper

  • Enclosing class:
    ChannelManagerConstructor

    public static interface ChannelManagerConstructor.RouterWrapper
    A simple interface to provide routes to LDK.
    • Method Detail

      • find_route

        Result_RouteLightningErrorZ find_route​(byte[] payer_node_id,
                                               RouteParameters route_params,
                                               ChannelDetails[] first_hops,
                                               InFlightHtlcs inflight_htlcs,
                                               @Nullable
                                               byte[] payment_hash,
                                               @Nullable
                                               byte[] payment_id,
                                               DefaultRouter default_router)
        Gets a route for the given payment.
        Parameters:
        payment_hash - is non-null for this-node-originated payments, however in the future trampoline or other HTLC re-routing may cause it to be null as we find routes for payments which we did not originate.
        payment_id - is non-null for this-node-originated payments, however in the future trampoline or other HTLC re-routing may cause it to be null as we find routes for payments which we did not originate.
        default_router - Provides a router which uses the LDK route-finder and a ProbabilisticScorer using the provided ProbabilisticScoringParameters. You may use this to fetch a "default" route, modifying or storing it as you wish before returning the route to LDK.