UNPKG

lightningdevkit

Version:
69 lines (68 loc) 2.76 kB
import { LSPSResponseError } from '../structs/LSPSResponseError.mjs'; import { LSPS1GetInfoResponse } from '../structs/LSPS1GetInfoResponse.mjs'; import { LSPS1CreateOrderResponse } from '../structs/LSPS1CreateOrderResponse.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * An enum that captures all the valid JSON-RPC responses in the bLIP-51 / LSPS1 protocol. */ export declare class LSPS1Response extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the LSPS1Response */ clone(): LSPS1Response; /** * Utility method to constructs a new GetInfo-variant LSPS1Response */ static constructor_get_info(a: LSPS1GetInfoResponse): LSPS1Response; /** * Utility method to constructs a new GetInfoError-variant LSPS1Response */ static constructor_get_info_error(a: LSPSResponseError): LSPS1Response; /** * Utility method to constructs a new CreateOrder-variant LSPS1Response */ static constructor_create_order(a: LSPS1CreateOrderResponse): LSPS1Response; /** * Utility method to constructs a new CreateOrderError-variant LSPS1Response */ static constructor_create_order_error(a: LSPSResponseError): LSPS1Response; /** * Utility method to constructs a new GetOrder-variant LSPS1Response */ static constructor_get_order(a: LSPS1CreateOrderResponse): LSPS1Response; /** * Utility method to constructs a new GetOrderError-variant LSPS1Response */ static constructor_get_order_error(a: LSPSResponseError): LSPS1Response; /** * Checks if two LSPS1Responses contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: LSPS1Response): boolean; } /** A LSPS1Response of type GetInfo */ export declare class LSPS1Response_GetInfo extends LSPS1Response { get_info: LSPS1GetInfoResponse; } /** A LSPS1Response of type GetInfoError */ export declare class LSPS1Response_GetInfoError extends LSPS1Response { get_info_error: LSPSResponseError; } /** A LSPS1Response of type CreateOrder */ export declare class LSPS1Response_CreateOrder extends LSPS1Response { create_order: LSPS1CreateOrderResponse; } /** A LSPS1Response of type CreateOrderError */ export declare class LSPS1Response_CreateOrderError extends LSPS1Response { create_order_error: LSPSResponseError; } /** A LSPS1Response of type GetOrder */ export declare class LSPS1Response_GetOrder extends LSPS1Response { get_order: LSPS1CreateOrderResponse; } /** A LSPS1Response of type GetOrderError */ export declare class LSPS1Response_GetOrderError extends LSPS1Response { get_order_error: LSPSResponseError; }