UNPKG

lightningdevkit

Version:
78 lines (77 loc) 3.15 kB
import { Option_u64Z } from '../structs/Option_u64Z.mjs'; import { LSPSRequestId } from '../structs/LSPSRequestId.mjs'; import { LSPS2OpeningFeeParams } from '../structs/LSPS2OpeningFeeParams.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * An event which an LSPS2 client should take some action in response to. */ export declare class LSPS2ClientEvent extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the LSPS2ClientEvent */ clone(): LSPS2ClientEvent; /** * Utility method to constructs a new OpeningParametersReady-variant LSPS2ClientEvent */ static constructor_opening_parameters_ready(request_id: LSPSRequestId, counterparty_node_id: Uint8Array, opening_fee_params_menu: LSPS2OpeningFeeParams[]): LSPS2ClientEvent; /** * Utility method to constructs a new InvoiceParametersReady-variant LSPS2ClientEvent */ static constructor_invoice_parameters_ready(request_id: LSPSRequestId, counterparty_node_id: Uint8Array, intercept_scid: bigint, cltv_expiry_delta: number, payment_size_msat: Option_u64Z): LSPS2ClientEvent; /** * Checks if two LSPS2ClientEvents contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: LSPS2ClientEvent): boolean; } /** A LSPS2ClientEvent of type OpeningParametersReady */ export declare class LSPS2ClientEvent_OpeningParametersReady extends LSPS2ClientEvent { /** * The identifier of the issued bLIP-52 / LSPS2 `get_info` request, as returned by * [`LSPS2ClientHandler::request_opening_params`] * * This can be used to track which request this event corresponds to. * * [`LSPS2ClientHandler::request_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::request_opening_params */ request_id: LSPSRequestId; /** * The node id of the LSP that provided this response. */ counterparty_node_id: Uint8Array; /** * The menu of fee parameters the LSP is offering at this time. * You must select one of these if you wish to proceed. */ opening_fee_params_menu: LSPS2OpeningFeeParams[]; } /** A LSPS2ClientEvent of type InvoiceParametersReady */ export declare class LSPS2ClientEvent_InvoiceParametersReady extends LSPS2ClientEvent { /** * The identifier of the issued bLIP-52 / LSPS2 `buy` request, as returned by * [`LSPS2ClientHandler::select_opening_params`]. * * This can be used to track which request this event corresponds to. * * [`LSPS2ClientHandler::select_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::select_opening_params */ request_id: LSPSRequestId; /** * The node id of the LSP. */ counterparty_node_id: Uint8Array; /** * The intercept short channel id to use in the route hint. */ intercept_scid: bigint; /** * The `cltv_expiry_delta` to use in the route hint. */ cltv_expiry_delta: number; /** * The initial payment size you specified. */ payment_size_msat: Option_u64Z; }