Core types and utilities for JSON-RPC 2.0 implementation.
This package provides the fundamental TypeScript types and interfaces that strictly adhere to the JSON-RPC 2.0 Specification. It serves as the foundation for the @ts-json-rpc/client and @ts-json-rpc/server packages.
npm install @ts-json-rpc/coreJSONRPCRequest<TParams>- JSON-RPC request messageJSONRPCNotification<TParams>- JSON-RPC notification message (no response expected)JSONRPCSuccessResponse<TResult>- JSON-RPC success response messageJSONRPCErrorResponse- JSON-RPC error response messageJSONRPCResponse<TResult>- Union of success and error response types
JSONRPCRequestBatch<TParams>- Array of JSON-RPC requestsJSONRPCNotificationBatch<TParams>- Array of JSON-RPC notificationsJSONRPCResponseBatch<TResult>- Array of JSON-RPC responses
JSONRPCError- JSON-RPC error object structure
JSONRPC_ERROR_CODES- Standard JSON-RPC error codesJSONRPC_ERROR_MESSAGES- Standard JSON-RPC error messages
MIT