OracleLightningNetwork Class

class OracleLightningNetwork.OracleLightningNetwork(channel_graph: pickhardtpayments.ChannelGraph.ChannelGraph)

Bases: pickhardtpayments.ChannelGraph.ChannelGraph

property network
send_onion(path, amt)
Return type


settle_payment(path: List[pickhardtpayments.Channel.Channel], payment_amount: int)

receives a dictionary with channels and payment amounts and adjusts the balances of the channels along the path.

settle_payment should only be called after all send_onions for a payment terminated successfully! # TODO testing

theoretical_maximum_payable_amount(source: str, destination: str, base_fee: int = 0)

Uses the information from the oracle to compute the min-cut between source and destination

This is only useful for experiments and simulations if one wants to know what would be possible to actually send before starting the payment loop