New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jsonrpc-ts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonrpc-ts - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

0

index.d.ts

@@ -0,0 +0,0 @@ export * from './rpc-client';

8

index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,3 +14,3 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +17,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -0,0 +0,0 @@ export * from './rpc-client-options.interface';

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,3 +14,3 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +17,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -0,0 +0,0 @@ import { AxiosRequestConfig } from 'axios';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=rpc-client-options.interface.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=rpc-request.interface.js.map

@@ -0,0 +0,0 @@ import { RpcErrorCode } from '../rpc-error-codes.enum';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=rpc-response-error.interface.js.map

@@ -0,0 +0,0 @@ import { RpcResponseError } from './rpc-response-error.interface';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=rpc-response.interface.js.map
{
"name": "jsonrpc-ts",
"version": "0.2.1",
"version": "0.3.0",
"description": "Strongly Typed Fast and lightweight JSON RPC 2.0 Client for Nodejs",

@@ -28,9 +28,9 @@ "main": "index.js",

"http-jsonrpc-server": "^1.1.0",
"jest": "^26.1.0",
"ts-jest": "^26.1.1"
"jest": "^29.7.0",
"ts-jest": "^29.1.1"
},
"dependencies": {
"axios": "^0.19.2",
"typescript": "^3.9.6"
"axios": "^1.5.1",
"typescript": "^5.2"
}
}

@@ -0,0 +0,0 @@ # JSONRPC Typescript

import { AxiosResponse } from 'axios';
import { RpcClientOptions, RpcRequest, RpcResponse } from './interfaces';
declare type RpcBatchRequest<TMethod, TParams> = Array<RpcRequest<TMethod, TParams>>;
declare type RpcBatchResponse<TResponse, TError> = Array<RpcResponse<TResponse, TError>>;
declare type ReturnTypeOfMethod<T> = T extends (...args: Array<any>) => any ? ReturnType<T> : any;
declare type ReturnTypeOfMethodIfExists<T, S> = S extends keyof T ? ReturnTypeOfMethod<T[S]> : any;
declare type MethodParams<T> = T extends (...args: infer P) => any ? P[0] : T;
declare type MethodParamsIfExists<T, S> = S extends keyof T ? MethodParams<T[S]> : S;
type RpcBatchRequest<TMethod, TParams> = Array<RpcRequest<TMethod, TParams>>;
type RpcBatchResponse<TResponse, TError> = Array<RpcResponse<TResponse, TError>>;
type ReturnTypeOfMethod<T> = T extends (...args: Array<any>) => any ? ReturnType<T> : any;
type ReturnTypeOfMethodIfExists<T, S> = S extends keyof T ? ReturnTypeOfMethod<T[S]> : any;
type MethodParams<T> = T extends (...args: infer P) => any ? P[0] : T;
type MethodParamsIfExists<T, S> = S extends keyof T ? MethodParams<T[S]> : S;
export declare class RpcClient<TMethods = any> {

@@ -10,0 +10,0 @@ private readonly options;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export declare enum RpcErrorCode {

@@ -31,3 +31,3 @@ "use strict";

RpcErrorCode[RpcErrorCode["SERVER_ERROR"] = -32000] = "SERVER_ERROR";
})(RpcErrorCode = exports.RpcErrorCode || (exports.RpcErrorCode = {}));
})(RpcErrorCode || (exports.RpcErrorCode = RpcErrorCode = {}));
//# sourceMappingURL=rpc-error-codes.enum.js.map

@@ -0,0 +0,0 @@ import { RpcResponseError } from './interfaces';

@@ -0,0 +0,0 @@ "use strict";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc