lightningdevkit
Version:
Lightning Development Kit
53 lines (52 loc) • 1.99 kB
text/typescript
import { LSPSResponseError } from '../structs/LSPSResponseError.mjs';
import { LSPS2GetInfoResponse } from '../structs/LSPS2GetInfoResponse.mjs';
import { LSPS2BuyResponse } from '../structs/LSPS2BuyResponse.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An enum that captures all the valid JSON-RPC responses in the bLIP-52 / LSPS2 protocol.
*/
export declare class LSPS2Response extends CommonBase {
protected constructor(_dummy: null, ptr: bigint);
clone_ptr(): bigint;
/**
* Creates a copy of the LSPS2Response
*/
clone(): LSPS2Response;
/**
* Utility method to constructs a new GetInfo-variant LSPS2Response
*/
static constructor_get_info(a: LSPS2GetInfoResponse): LSPS2Response;
/**
* Utility method to constructs a new GetInfoError-variant LSPS2Response
*/
static constructor_get_info_error(a: LSPSResponseError): LSPS2Response;
/**
* Utility method to constructs a new Buy-variant LSPS2Response
*/
static constructor_buy(a: LSPS2BuyResponse): LSPS2Response;
/**
* Utility method to constructs a new BuyError-variant LSPS2Response
*/
static constructor_buy_error(a: LSPSResponseError): LSPS2Response;
/**
* Checks if two LSPS2Responses contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
eq(b: LSPS2Response): boolean;
}
/** A LSPS2Response of type GetInfo */
export declare class LSPS2Response_GetInfo extends LSPS2Response {
get_info: LSPS2GetInfoResponse;
}
/** A LSPS2Response of type GetInfoError */
export declare class LSPS2Response_GetInfoError extends LSPS2Response {
get_info_error: LSPSResponseError;
}
/** A LSPS2Response of type Buy */
export declare class LSPS2Response_Buy extends LSPS2Response {
buy: LSPS2BuyResponse;
}
/** A LSPS2Response of type BuyError */
export declare class LSPS2Response_BuyError extends LSPS2Response {
buy_error: LSPSResponseError;
}