lightningdevkit
Version:
Lightning Development Kit
84 lines (83 loc) • 2.91 kB
text/typescript
import { IOError } from '../enums/IOError.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* An error in decoding a message or struct.
*/
export declare class DecodeError extends CommonBase {
protected constructor(_dummy: null, ptr: bigint);
clone_ptr(): bigint;
/**
* Creates a copy of the DecodeError
*/
clone(): DecodeError;
/**
* Utility method to constructs a new UnknownVersion-variant DecodeError
*/
static constructor_unknown_version(): DecodeError;
/**
* Utility method to constructs a new UnknownRequiredFeature-variant DecodeError
*/
static constructor_unknown_required_feature(): DecodeError;
/**
* Utility method to constructs a new InvalidValue-variant DecodeError
*/
static constructor_invalid_value(): DecodeError;
/**
* Utility method to constructs a new ShortRead-variant DecodeError
*/
static constructor_short_read(): DecodeError;
/**
* Utility method to constructs a new BadLengthDescriptor-variant DecodeError
*/
static constructor_bad_length_descriptor(): DecodeError;
/**
* Utility method to constructs a new Io-variant DecodeError
*/
static constructor_io(a: IOError): DecodeError;
/**
* Utility method to constructs a new UnsupportedCompression-variant DecodeError
*/
static constructor_unsupported_compression(): DecodeError;
/**
* Utility method to constructs a new DangerousValue-variant DecodeError
*/
static constructor_dangerous_value(): DecodeError;
/**
* Generates a non-cryptographic 64-bit hash of the DecodeError.
*/
hash(): bigint;
/**
* Checks if two DecodeErrors contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
eq(b: DecodeError): boolean;
/**
* Get the string representation of a DecodeError object
*/
to_str(): string;
}
/** A DecodeError of type UnknownVersion */
export declare class DecodeError_UnknownVersion extends DecodeError {
}
/** A DecodeError of type UnknownRequiredFeature */
export declare class DecodeError_UnknownRequiredFeature extends DecodeError {
}
/** A DecodeError of type InvalidValue */
export declare class DecodeError_InvalidValue extends DecodeError {
}
/** A DecodeError of type ShortRead */
export declare class DecodeError_ShortRead extends DecodeError {
}
/** A DecodeError of type BadLengthDescriptor */
export declare class DecodeError_BadLengthDescriptor extends DecodeError {
}
/** A DecodeError of type Io */
export declare class DecodeError_Io extends DecodeError {
io: IOError;
}
/** A DecodeError of type UnsupportedCompression */
export declare class DecodeError_UnsupportedCompression extends DecodeError {
}
/** A DecodeError of type DangerousValue */
export declare class DecodeError_DangerousValue extends DecodeError {
}