UNPKG

lightningdevkit

Version:
90 lines (89 loc) 2.88 kB
import { ShutdownScript } from '../structs/ShutdownScript.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * Indicates an error on the client's part (usually some variant of attempting to use too-low or * too-high values) */ export declare class APIError extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the APIError */ clone(): APIError; /** * Utility method to constructs a new APIMisuseError-variant APIError */ static constructor_apimisuse_error(err: string): APIError; /** * Utility method to constructs a new FeeRateTooHigh-variant APIError */ static constructor_fee_rate_too_high(err: string, feerate: number): APIError; /** * Utility method to constructs a new InvalidRoute-variant APIError */ static constructor_invalid_route(err: string): APIError; /** * Utility method to constructs a new ChannelUnavailable-variant APIError */ static constructor_channel_unavailable(err: string): APIError; /** * Utility method to constructs a new MonitorUpdateInProgress-variant APIError */ static constructor_monitor_update_in_progress(): APIError; /** * Utility method to constructs a new IncompatibleShutdownScript-variant APIError */ static constructor_incompatible_shutdown_script(script: ShutdownScript): APIError; /** * Checks if two APIErrors contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: APIError): boolean; /** * Serialize the APIError object into a byte array which can be read by APIError_read */ write(): Uint8Array; } /** A APIError of type APIMisuseError */ export declare class APIError_APIMisuseError extends APIError { /** * A human-readable error message */ err: string; } /** A APIError of type FeeRateTooHigh */ export declare class APIError_FeeRateTooHigh extends APIError { /** * A human-readable error message */ err: string; /** * The feerate which was too high. */ feerate: number; } /** A APIError of type InvalidRoute */ export declare class APIError_InvalidRoute extends APIError { /** * A human-readable error message */ err: string; } /** A APIError of type ChannelUnavailable */ export declare class APIError_ChannelUnavailable extends APIError { /** * A human-readable error message */ err: string; } /** A APIError of type MonitorUpdateInProgress */ export declare class APIError_MonitorUpdateInProgress extends APIError { } /** A APIError of type IncompatibleShutdownScript */ export declare class APIError_IncompatibleShutdownScript extends APIError { /** * The incompatible shutdown script. */ script: ShutdownScript; }