2020-04-25 10:54:54 +03:00
|
|
|
export declare enum LogLevel {
|
|
|
|
DEBUG = "DEBUG",
|
|
|
|
INFO = "INFO",
|
|
|
|
WARNING = "WARNING",
|
|
|
|
ERROR = "ERROR",
|
|
|
|
OFF = "OFF"
|
|
|
|
}
|
|
|
|
export declare enum ErrorCode {
|
|
|
|
UNKNOWN_ERROR = "UNKNOWN_ERROR",
|
|
|
|
NOT_IMPLEMENTED = "NOT_IMPLEMENTED",
|
|
|
|
UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION",
|
|
|
|
NETWORK_ERROR = "NETWORK_ERROR",
|
|
|
|
SERVER_ERROR = "SERVER_ERROR",
|
|
|
|
TIMEOUT = "TIMEOUT",
|
|
|
|
BUFFER_OVERRUN = "BUFFER_OVERRUN",
|
|
|
|
NUMERIC_FAULT = "NUMERIC_FAULT",
|
|
|
|
MISSING_NEW = "MISSING_NEW",
|
|
|
|
INVALID_ARGUMENT = "INVALID_ARGUMENT",
|
|
|
|
MISSING_ARGUMENT = "MISSING_ARGUMENT",
|
|
|
|
UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT",
|
|
|
|
CALL_EXCEPTION = "CALL_EXCEPTION",
|
|
|
|
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
|
|
|
|
NONCE_EXPIRED = "NONCE_EXPIRED",
|
|
|
|
REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED",
|
2021-05-17 23:19:36 +03:00
|
|
|
UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT",
|
2022-08-18 21:48:39 +03:00
|
|
|
TRANSACTION_REPLACED = "TRANSACTION_REPLACED",
|
|
|
|
ACTION_REJECTED = "ACTION_REJECTED"
|
2020-04-25 10:54:54 +03:00
|
|
|
}
|
2019-08-02 09:10:58 +03:00
|
|
|
export declare class Logger {
|
|
|
|
readonly version: string;
|
2020-04-25 10:54:54 +03:00
|
|
|
static errors: typeof ErrorCode;
|
|
|
|
static levels: typeof LogLevel;
|
2019-08-02 09:10:58 +03:00
|
|
|
constructor(version: string);
|
|
|
|
_log(logLevel: LogLevel, args: Array<any>): void;
|
|
|
|
debug(...args: Array<any>): void;
|
|
|
|
info(...args: Array<any>): void;
|
|
|
|
warn(...args: Array<any>): void;
|
2020-04-25 10:54:54 +03:00
|
|
|
makeError(message: string, code?: ErrorCode, params?: any): Error;
|
|
|
|
throwError(message: string, code?: ErrorCode, params?: any): never;
|
2019-08-02 09:10:58 +03:00
|
|
|
throwArgumentError(message: string, name: string, value: any): never;
|
2020-07-13 15:03:56 +03:00
|
|
|
assert(condition: any, message: string, code?: ErrorCode, params?: any): void;
|
|
|
|
assertArgument(condition: any, message: string, name: string, value: any): void;
|
2019-08-02 09:10:58 +03:00
|
|
|
checkNormalize(message?: string): void;
|
|
|
|
checkSafeUint53(value: number, message?: string): void;
|
|
|
|
checkArgumentCount(count: number, expectedCount: number, message?: string): void;
|
|
|
|
checkNew(target: any, kind: any): void;
|
|
|
|
checkAbstract(target: any, kind: any): void;
|
|
|
|
static globalLogger(): Logger;
|
|
|
|
static setCensorship(censorship: boolean, permanent?: boolean): void;
|
2020-02-26 13:06:48 +03:00
|
|
|
static setLogLevel(logLevel: LogLevel): void;
|
2020-11-17 07:07:24 +03:00
|
|
|
static from(version: string): Logger;
|
2019-08-02 09:10:58 +03:00
|
|
|
}
|
2021-01-19 13:22:54 +03:00
|
|
|
//# sourceMappingURL=index.d.ts.map
|