UNPKG

@make-software/csprclick-core-types

Version:

Typescript definitions for CSPR.click core packages

29 lines (28 loc) 689 B
export type CoreRPCRequest<T> = { jsonrpc: string; method: string; params: T; id?: string | number | null; }; export type CoreRPCError = { code: number; message: string; data?: any; }; export type CoreRPCResponse<T> = { jsonrpc: string; result?: T; error?: CoreRPCError; id: string | number | null; }; export declare enum RPC_ERRORS { METHOD_NOT_FOUND = -32601, INVALID_PARAMS = -32602, UNHANDLED_TKEY_ERROR = -10000, UNLOCK_PIN_REQUIRED = -10005, WRONG_UNLOCK_PIN = -10010, UNLOCK_PIN_TIMEOUT = -1015, THRESHOLD_NOT_REACHED = -10020, OTHER_SIGN_REQUEST_IN_PROGRESS = -10025, WRONG_RECOVERY_PHRASE = -10030 }