lightningdevkit
Version:
Lightning Development Kit
58 lines (57 loc) • 2.02 kB
text/typescript
import { Destination } from '../structs/Destination.mjs';
import { Option_CVec_SocketAddressZZ } from '../structs/Option_CVec_SocketAddressZZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* A path for sending an [`OnionMessage`].
*/
export declare class OnionMessagePath extends CommonBase {
/**
* Nodes on the path between the sender and the destination.
*
* Returns a copy of the field.
*/
get_intermediate_nodes(): Uint8Array[];
/**
* Nodes on the path between the sender and the destination.
*/
set_intermediate_nodes(val: Uint8Array[]): void;
/**
* The recipient of the message.
*/
get_destination(): Destination;
/**
* The recipient of the message.
*/
set_destination(val: Destination): void;
/**
* Addresses that may be used to connect to [`OnionMessagePath::first_node`].
*
* Only needs to be set if a connection to the node is required. [`OnionMessenger`] may use
* this to initiate such a connection.
*
* Returns a copy of the field.
*/
get_first_node_addresses(): Option_CVec_SocketAddressZZ;
/**
* Addresses that may be used to connect to [`OnionMessagePath::first_node`].
*
* Only needs to be set if a connection to the node is required. [`OnionMessenger`] may use
* this to initiate such a connection.
*/
set_first_node_addresses(val: Option_CVec_SocketAddressZZ): void;
/**
* Constructs a new OnionMessagePath given each field
*/
static constructor_new(intermediate_nodes_arg: Uint8Array[], destination_arg: Destination, first_node_addresses_arg: Option_CVec_SocketAddressZZ): OnionMessagePath;
clone_ptr(): bigint;
/**
* Creates a copy of the OnionMessagePath
*/
clone(): OnionMessagePath;
/**
* Returns the first node in the path.
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
first_node(): Uint8Array;
}