Finding paths NOT originating from you with lnd

Finding paths NOT originating from you with lnd

I’m interested in finding paths from senders whose node you don’t run to potential receivers. According to https://api.lightning.community/?python#queryroutes , you can do that by specifying the parameter source_pub_key to be any public key you wish and not just yours. In reality, this does not work as the querryroutes command does not support any other parameters than:

OPTIONS:

dest value: the 33-byte hex-encoded public key for the payment destination

amt value: the amount to send expressed in satoshis

fee_limit value: maximum fee allowed in satoshis when sending the payment

fee_limit_percent value: percentage of the payment’s amount used as the maximum fee allowed when sending the payment

final_cltv_delta value: number of blocks the last hop has to reveal the preimage

use_mc: use mission control probabilities

Does anyone know if there used to be a possibility of adding source_pub_key and it was removed or it never existed in the first place? More importantly, is there a way to construct paths from a source to a destination, when you don’t actually run the node of the source and you don’t care about actually forwarding payments and packets but rather just constructing paths according to the shortest paths algorithm of lnd.

I don’t know if that possibility ever existed as an api call 8n lnd. but you can certainly call the describegraph api call to get all nodes and channels that are publically known. This json blob can easily be imported with a few lines of code as a graph in any graph library such as neo4j or networkx once the network is there you can run any pathfinding algorithm from any source to any destination. Note that due to routing fees the shortest paths should be searched from destination to sender as the feerate is dynamic and depends on the fees that will have to be paid by future nodes and not only on the payment amount

share | improve this answer

Rene Pickhardt
Автор: newsmen_lj
Предыдущий материал

П’ята перемога поспіль: Прогноз на матч Лугано – Динамо

Следующий материал

У МВС Грузії озвучили прізвище співвітчизника, застреленого українською поліцією

Коментарии (0)