import { PaymentResultSerialisation } from "./paymentResult"; import { RelayTransaction } from "./relayTransaction"; /** * Base class for errors thrown by the application. * If a `nestedError` is given, it customizes the stacktrace in order to also * show the full stack trace of the originating error. */ export declare class ApplicationError extends Error { /** * * @param message The error message. * @param nestedError Optionally, the `Error` instance of the originating error. * @param name The name of the error shown in the stack trace; the `name` property is set to this value. * Subclasses of `ApplicationError` should always pass their name. * If not provided, the default value `"ApplicationError"` will be used. */ constructor(message: string); constructor(message: string, nestedError: Error); constructor(message: string, nestedError: Error | undefined, name: string); } /** * Thrown when startup configuration is incorrect. */ export declare class ConfigurationError extends ApplicationError { constructor(message: string); } /** * Thrown when an event times out. **/ export declare class TimeoutError extends ApplicationError { constructor(message: string); } /** * Thrown when an attempt to fetch a block fails. */ export declare class BlockFetchingError extends ApplicationError { constructor(message: string); constructor(message: string, nestedError: Error); } /** * Thrown when data does not match a specified format * Error messages must be safe to expose publicly */ export declare class PublicDataValidationError extends ApplicationError { constructor(message: string); } /** * Thrown when an appointment fails inspection * Error messages must be safe to expose publicly */ export declare class PublicInspectionError extends ApplicationError { constructor(message: string, nestedError?: Error); } /** * Thrown when incorrect arguments are supploed to a function */ export declare class ArgumentError extends ApplicationError { readonly args: any[]; constructor(message: string); constructor(message: string, ...args: any[]); } /** * Thrown when an inconsistency in a queue is observed. */ export declare class QueueConsistencyError extends ApplicationError { constructor(message: string); } /** * Error returned when the response to the API request is unsuccessful. */ export declare class HTTPResponseError extends ApplicationError { readonly statusCode: number; readonly body?: object | undefined; constructor(message: string, statusCode: number, body?: object | undefined); } /** * Error returned if the API returns a successful response, but the receipt signature is not valid. */ export declare class InvalidReceiptSignatureError extends ApplicationError { readonly receipt: RelayTransaction; readonly signature: string; constructor(message: string, receipt: RelayTransaction, signature: string); constructor(message: string, receipt: RelayTransaction, signature: string, nestedError: Error); } /** * Error returned if the API returns a successful response, but the receipt id is not valid. */ export declare class InvalidReceiptIdError extends ApplicationError { readonly receipt: RelayTransaction; readonly id: string; constructor(message: string, receipt: RelayTransaction, id: string); constructor(message: string, receipt: RelayTransaction, id: string, nestedError: Error); } /** * Acccount doesnt have enough balance */ export declare class InsufficientFundsError extends ArgumentError { readonly account: string; readonly paymentResult: PaymentResultSerialisation; constructor(message: string, account: string, paymentResult: PaymentResultSerialisation); } /** * Thrown when code that is not supposed to be reached was actually reached. It can be used to make sure that a series of if-then-else or * cases in a switch statement over an enum or union types is exhaustive, in a type-safe way. * Errors of this kind represent a bug. */ export declare class UnreachableCaseError extends ArgumentError { readonly name = "UnreachableCaseError"; constructor(val: never, message?: string); } export declare class TxSendError extends ApplicationError { readonly transactionHash?: string | undefined; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class TxSendInsufficientFundsError extends TxSendError { readonly transactionHash?: string | undefined; readonly name = "TxSendInsufficientFundsError"; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class TxSendNonceAlreadyUsedError extends TxSendError { readonly transactionHash?: string | undefined; readonly name = "TxSendNonceAlreadyUsedError"; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class TxSendKnownTransactionError extends TxSendError { readonly transactionHash?: string | undefined; readonly name = "TxSendKnownTransactionError"; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class TemporaryInfuraConnectionError extends TxSendError { readonly transactionHash?: string | undefined; readonly name = "TemporaryInfuraConnectionError"; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class PermanentInfuraConnectionError extends TxSendError { readonly transactionHash?: string | undefined; readonly name = "PermanentInfuraConnectionError"; constructor(message: string, nestedError: Error, transactionHash?: string | undefined); } export declare class TxRateLimitError extends TxSendError { readonly errorCode: string | number; readonly errorData: string; readonly statusCode: string | number; readonly responseText: string; readonly transactionHash?: string | undefined; readonly name = "TxRateLimitError"; constructor(message: string, nestedError: Error, errorCode: string | number, errorData: string, statusCode: string | number, responseText: string, transactionHash?: string | undefined); } /** * Thrown when an anchor state for a given block hash could not be found */ export declare class AnchorStateNotFoundError extends ArgumentError { constructor(blockNumber: number, blockHash: string, componentName: string); } //# sourceMappingURL=errors.d.ts.map