UNPKG

lightningdevkit

Version:
51 lines (50 loc) 1.8 kB
import { LSPSResponseError } from '../structs/LSPSResponseError.mjs'; import { LSPS0Message } from '../structs/LSPS0Message.mjs'; import { LSPS1Message } from '../structs/LSPS1Message.mjs'; import { LSPS2Message } from '../structs/LSPS2Message.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * A (de-)serializable LSPS message allowing to be sent over the wire. */ export declare class LSPSMessage extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the LSPSMessage */ clone(): LSPSMessage; /** * Utility method to constructs a new Invalid-variant LSPSMessage */ static constructor_invalid(a: LSPSResponseError): LSPSMessage; /** * Utility method to constructs a new LSPS0-variant LSPSMessage */ static constructor_lsps0(a: LSPS0Message): LSPSMessage; /** * Utility method to constructs a new LSPS1-variant LSPSMessage */ static constructor_lsps1(a: LSPS1Message): LSPSMessage; /** * Utility method to constructs a new LSPS2-variant LSPSMessage */ static constructor_lsps2(a: LSPS2Message): LSPSMessage; /** * Checks if two LSPSMessages contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: LSPSMessage): boolean; } /** A LSPSMessage of type Invalid */ export declare class LSPSMessage_Invalid extends LSPSMessage { invalid: LSPSResponseError; } /** A LSPSMessage of type LSPS0 */ export declare class LSPSMessage_LSPS0 extends LSPSMessage { } /** A LSPSMessage of type LSPS1 */ export declare class LSPSMessage_LSPS1 extends LSPSMessage { } /** A LSPSMessage of type LSPS2 */ export declare class LSPSMessage_LSPS2 extends LSPSMessage { }