import { EthereumRpcError, EthereumProviderError } from './classes'; interface EthereumErrorOptions { message?: string; data?: T; } interface ServerErrorOptions extends EthereumErrorOptions { code: number; } declare type CustomErrorOptions = ServerErrorOptions; declare type EthErrorsArg = EthereumErrorOptions | string; export declare const ethErrors: { rpc: { /** * Get a JSON RPC 2.0 Parse (-32700) error. */ parse: (arg: EthErrorsArg) => EthereumRpcError; /** * Get a JSON RPC 2.0 Invalid Request (-32600) error. */ invalidRequest: (arg: EthErrorsArg) => EthereumRpcError; /** * Get a JSON RPC 2.0 Invalid Params (-32602) error. */ invalidParams: (arg: EthErrorsArg) => EthereumRpcError; /** * Get a JSON RPC 2.0 Method Not Found (-32601) error. */ methodNotFound: (arg: EthErrorsArg) => EthereumRpcError; /** * Get a JSON RPC 2.0 Internal (-32603) error. */ internal: (arg: EthErrorsArg) => EthereumRpcError; /** * Get a JSON RPC 2.0 Server error. * Permits integer error codes in the [ -32099 <= -32005 ] range. * Codes -32000 through -32004 are reserved by EIP-1474. */ server: (opts: ServerErrorOptions) => EthereumRpcError; /** * Get an Ethereum JSON RPC Invalid Input (-32000) error. */ invalidInput: (arg: EthErrorsArg) => EthereumRpcError; /** * Get an Ethereum JSON RPC Resource Not Found (-32001) error. */ resourceNotFound: (arg: EthErrorsArg) => EthereumRpcError; /** * Get an Ethereum JSON RPC Resource Unavailable (-32002) error. */ resourceUnavailable: (arg: EthErrorsArg) => EthereumRpcError; /** * Get an Ethereum JSON RPC Transaction Rejected (-32003) error. */ transactionRejected: (arg: EthErrorsArg) => EthereumRpcError; /** * Get an Ethereum JSON RPC Method Not Supported (-32004) error. */ methodNotSupported: (arg: EthErrorsArg) => EthereumRpcError; /** * Get an Ethereum JSON RPC Limit Exceeded (-32005) error. */ limitExceeded: (arg: EthErrorsArg) => EthereumRpcError; }; provider: { /** * Get an Ethereum Provider User Rejected Request (4001) error. */ userRejectedRequest: (arg: EthErrorsArg) => EthereumProviderError; /** * Get an Ethereum Provider Unauthorized (4100) error. */ unauthorized: (arg: EthErrorsArg) => EthereumProviderError; /** * Get an Ethereum Provider Unsupported Method (4200) error. */ unsupportedMethod: (arg: EthErrorsArg) => EthereumProviderError; /** * Get an Ethereum Provider Not Connected (4900) error. */ disconnected: (arg: EthErrorsArg) => EthereumProviderError; /** * Get an Ethereum Provider Chain Not Connected (4901) error. */ chainDisconnected: (arg: EthErrorsArg) => EthereumProviderError; /** * Get a custom Ethereum Provider error. */ custom: (opts: CustomErrorOptions) => EthereumProviderError; }; }; export {};