UNPKG

lightningdevkit

Version:
36 lines (35 loc) 1.6 kB
import { CommonBase } from './CommonBase.mjs'; /** An implementation of NodeIdLookUp */ export interface NodeIdLookUpInterface { /**Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. * * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. * * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger * * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ next_node_id(short_channel_id: bigint): Uint8Array; } /** * An interface for looking up the node id of a channel counterparty for the purpose of forwarding * an [`OnionMessage`]. * * [`OnionMessage`]: crate::ln::msgs::OnionMessage */ export declare class NodeIdLookUp extends CommonBase { /** Creates a new instance of NodeIdLookUp from a given implementation */ static new_impl(arg: NodeIdLookUpInterface): NodeIdLookUp; /** * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`. * * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers. * * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger * * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None */ next_node_id(short_channel_id: bigint): Uint8Array; }