UNPKG

@bigmi/core

Version:

TypeScript library for Bitcoin apps.

58 lines (57 loc) 1.49 kB
import { BaseError } from './base.js'; /** * @enum {number} RpcErrorCode * @description JSON-RPC error codes * @see https://www.jsonrpc.org/specification#error_object */ export declare enum RpcErrorCode { /** * Parse error Invalid JSON **/ PARSE_ERROR = -32700, /** * The JSON sent is not a valid Request object. **/ INVALID_REQUEST = -32600, /** * The method does not exist/is not available. **/ METHOD_NOT_FOUND = -32601, /** * Invalid method parameter(s). */ INVALID_PARAMS = -32602, /** * Internal JSON-RPC error. * This is a generic error, used when the server encounters an error in performing the request. **/ INTERNAL_ERROR = -32603, /** * user rejected/canceled the request */ USER_REJECTION = -32000, /** * method is not supported for the address provided */ METHOD_NOT_SUPPORTED = -32001, /** * The client does not have permission to access the requested resource. */ ACCESS_DENIED = -32002, /** * Unknown generic errors */ MISC_ERROR = -1 } export declare class UserRejectedRequestError extends BaseError { code: RpcErrorCode; constructor(message?: string); } export declare class MethodNotSupportedRpcError extends BaseError { code: RpcErrorCode; constructor(method?: string); } export declare class ParseError extends BaseError { code: RpcErrorCode; constructor(message?: string); }