lightningdevkit
Version:
Lightning Development Kit
39 lines (38 loc) • 1.39 kB
text/typescript
import { LSPSRequestId } from '../structs/LSPSRequestId.mjs';
import { LSPS2Request } from '../structs/LSPS2Request.mjs';
import { LSPS2Response } from '../structs/LSPS2Response.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An enum that captures all valid JSON-RPC messages in the bLIP-52 / LSPS2 protocol.
*/
export declare class LSPS2Message extends CommonBase {
protected constructor(_dummy: null, ptr: bigint);
clone_ptr(): bigint;
/**
* Creates a copy of the LSPS2Message
*/
clone(): LSPS2Message;
/**
* Utility method to constructs a new Request-variant LSPS2Message
*/
static constructor_request(a: LSPSRequestId, b: LSPS2Request): LSPS2Message;
/**
* Utility method to constructs a new Response-variant LSPS2Message
*/
static constructor_response(a: LSPSRequestId, b: LSPS2Response): LSPS2Message;
/**
* Checks if two LSPS2Messages contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
eq(b: LSPS2Message): boolean;
}
/** A LSPS2Message of type Request */
export declare class LSPS2Message_Request extends LSPS2Message {
_0: LSPSRequestId;
_1: LSPS2Request;
}
/** A LSPS2Message of type Response */
export declare class LSPS2Message_Response extends LSPS2Message {
_0: LSPSRequestId;
_1: LSPS2Response;
}