UNPKG

lightningdevkit

Version:
40 lines (39 loc) 1.31 kB
import { NodeId } from '../structs/NodeId.mjs'; import { ChannelInfo } from '../structs/ChannelInfo.mjs'; import { EffectiveCapacity } from '../structs/EffectiveCapacity.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * A wrapper around [`ChannelInfo`] representing information about the channel as directed from a * source node to a target node. */ export declare class DirectedChannelInfo extends CommonBase { clone_ptr(): bigint; /** * Creates a copy of the DirectedChannelInfo */ clone(): DirectedChannelInfo; /** * Returns information for the channel. */ channel(): ChannelInfo; /** * Returns the [`EffectiveCapacity`] of the channel in the direction. * * This is either the total capacity from the funding transaction, if known, or the * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known, * otherwise. */ effective_capacity(): EffectiveCapacity; /** * Returns the `node_id` of the source hop. * * Refers to the `node_id` forwarding the payment to the next hop. */ source(): NodeId; /** * Returns the `node_id` of the target hop. * * Refers to the `node_id` receiving the payment from the previous hop. */ target(): NodeId; }