import { JsonRpcResponseError } from './methods'; export declare class JsonRpcError extends Error { message: string; code: number; data?: string; cause?: Error; constructor(message: string, code: number, data?: string, cause?: Error); static fromResponse(error: JsonRpcResponseError): JsonRpcError; toString(): string; } /** * Numeric error codes for JSON-RPC errors, used for `.code` in {@link JsonRpcError}. * Implementation-defined wallet errors range from `-32099` to `-32000`. */ export declare enum JsonRpcErrorCode { /** Invalid JSON received by server while parsing */ ParseError = -32700, /** Invalid Request object */ InvalidRequest = -32600, /** Method not found/available */ MethodNotFound = -32601, /** Invalid method params */ InvalidParams = -32602, /** Internal JSON-RPC error */ InternalError = -32603, /** User rejected the request (implementation-defined wallet error) */ UserRejection = -32000, /** Address mismatch for the requested method (implementation-defined wallet error) */ MethodAddressMismatch = -32001, /** Access denied for the requested method (implementation-defined wallet error) */ MethodAccessDenied = -32002, /** * Unknown external error. * Error does not originate from the wallet. */ UnknownError = -31000, /** * User canceled the request. * Error may not originate from the wallet. */ UserCanceled = -31001 }