UNPKG

lightningdevkit

Version:
42 lines (41 loc) 1.76 kB
import { Bolt11SemanticError } from '../enums/Bolt11SemanticError.mjs'; import { Bolt11ParseError } from '../structs/Bolt11ParseError.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * Indicates that something went wrong while parsing or validating the invoice. Parsing errors * should be mostly seen as opaque and are only there for debugging reasons. Semantic errors * like wrong signatures, missing fields etc. could mean that someone tampered with the invoice. */ export declare class ParseOrSemanticError extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the ParseOrSemanticError */ clone(): ParseOrSemanticError; /** * Utility method to constructs a new ParseError-variant ParseOrSemanticError */ static constructor_parse_error(a: Bolt11ParseError): ParseOrSemanticError; /** * Utility method to constructs a new SemanticError-variant ParseOrSemanticError */ static constructor_semantic_error(a: Bolt11SemanticError): ParseOrSemanticError; /** * Checks if two ParseOrSemanticErrors contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: ParseOrSemanticError): boolean; /** * Get the string representation of a ParseOrSemanticError object */ to_str(): string; } /** A ParseOrSemanticError of type ParseError */ export declare class ParseOrSemanticError_ParseError extends ParseOrSemanticError { parse_error: Bolt11ParseError; } /** A ParseOrSemanticError of type SemanticError */ export declare class ParseOrSemanticError_SemanticError extends ParseOrSemanticError { semantic_error: Bolt11SemanticError; }