UNPKG

eulith-web3js-core

Version:

Eulith core web3js SDK (code to access Eulith services via web3js)

76 lines (75 loc) 1.75 kB
import { AxiosError } from "axios"; import { JsonRpcRequest, JsonRpcError } from "web3-types"; import * as Eulith from "./index"; /** * */ export declare class RPC extends Error { /** * Utility for Eulith.Exceptions.RPC, to throw (and LOG) the exception. * @param ex */ static Throw(logger: Eulith.Logging.ILogger, rpcOrArgs: RPC | { request?: JsonRpcRequest; error: JsonRpcError; }): void; /** */ constructor({ request, error }: { request?: JsonRpcRequest; error: JsonRpcError; }); request(): JsonRpcRequest<unknown[]>; error(): JsonRpcError<import("web3-types").JsonRpcResult>; private request_?; private error_?; } export declare class Auth extends Error { /** * Utility for Auth, to throw (and LOG) the exception. * @param ex */ static Throw(logger: Eulith.Logging.ILogger, ex: Auth | { message: string; }): void; /** */ constructor({ axiosErr, message }: { axiosErr?: AxiosError; message: string; }); } /** * */ export declare class API extends Error { /** * Utility for API, to throw (and LOG) the exception. * @param ex */ static Throw(logger: Eulith.Logging.ILogger, ex: API | { message: string; }): void; /** */ constructor({ message }: { message: string; }); } /** * */ export declare class Timeout extends Error { /** * Utility for Eulith.Exceptions.Timeout, to throw (and LOG) the exception. * @param ex */ static Throw(logger: Eulith.Logging.ILogger, ex: Timeout | { message: string; }): void; /** */ constructor({ message }: { message: string; }); }