lightningdevkit
Version:
Lightning Development Kit
46 lines (45 loc) • 1.62 kB
text/typescript
import { BlindedMessagePath } from '../structs/BlindedMessagePath.mjs';
import { ReadOnlyNetworkGraph } from '../structs/ReadOnlyNetworkGraph.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* The destination of an onion message.
*/
export declare class Destination extends CommonBase {
protected constructor(_dummy: null, ptr: bigint);
clone_ptr(): bigint;
/**
* Creates a copy of the Destination
*/
clone(): Destination;
/**
* Utility method to constructs a new Node-variant Destination
*/
static constructor_node(a: Uint8Array): Destination;
/**
* Utility method to constructs a new BlindedPath-variant Destination
*/
static constructor_blinded_path(a: BlindedMessagePath): Destination;
/**
* Generates a non-cryptographic 64-bit hash of the Destination.
*/
hash(): bigint;
/**
* Checks if two Destinations contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
eq(b: Destination): boolean;
/**
* Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a
* [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the
* provided [`ReadOnlyNetworkGraph`].
*/
resolve(network_graph: ReadOnlyNetworkGraph): void;
}
/** A Destination of type Node */
export declare class Destination_Node extends Destination {
node: Uint8Array;
}
/** A Destination of type BlindedPath */
export declare class Destination_BlindedPath extends Destination {
blinded_path: BlindedMessagePath;
}