Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@harmony-js/network

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmony-js/network - npm Package Compare versions

Comparing version 0.0.60 to 0.1.0

dist/rpcMethod/builder.d.ts

2

dist/index.d.ts

@@ -11,3 +11,3 @@ import mitt from 'mitt';

export * from './messenger/responseMiddleware';
export * from './rpcMethod/rpcbuilder';
export * from './rpcMethod/builder';
export * from './rpcMethod/net';

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

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

// rpc builder and blockchain method
tslib_1.__exportStar(require("./rpcMethod/rpcbuilder"), exports);
tslib_1.__exportStar(require("./rpcMethod/builder"), exports);
tslib_1.__exportStar(require("./rpcMethod/net"), exports);

@@ -20,0 +20,0 @@ tslib_1.__exportStar(require("./rpcMethod/rpc"), exports);

import { HarmonyCore, ChainType, ChainID } from '@harmony-js/utils';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { JsonRpc } from '../rpcMethod/builder';
import { HttpProvider } from '../providers/http';

@@ -4,0 +4,0 @@ import { WSProvider } from '../providers/ws';

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

var utils_1 = require("@harmony-js/utils");
var rpcbuilder_1 = require("../rpcMethod/rpcbuilder");
var builder_1 = require("../rpcMethod/builder");
var responseMiddleware_1 = require("./responseMiddleware");

@@ -179,3 +179,3 @@ var ws_1 = require("../providers/ws");

*/
_this.JsonRpc = new rpcbuilder_1.JsonRpc();
_this.JsonRpc = new builder_1.JsonRpc();
// set Network ID

@@ -182,0 +182,0 @@ _this.setNetworkID(utils_1.defaultConfig.Default.Network_ID);

import { w3cwebsocket as W3CWebsocket } from 'websocket';
import { BaseSocket } from './baseSocket';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { JsonRpc } from '../rpcMethod/builder';
import { RPCRequestPayload } from '../types';

@@ -5,0 +5,0 @@ declare class WSProvider extends BaseSocket {

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

var utils_1 = require("@harmony-js/utils");
var rpcbuilder_1 = require("../rpcMethod/rpcbuilder");
var builder_1 = require("../rpcMethod/builder");
var net_1 = require("../rpcMethod/net");

@@ -23,3 +23,3 @@ var WSProvider = /** @class */ (function (_super) {

_this.connection = _this.createWebsocketProvider(_this.url, _this.options);
_this.jsonRpc = new rpcbuilder_1.JsonRpc();
_this.jsonRpc = new builder_1.JsonRpc();
_this.subscriptions = {};

@@ -26,0 +26,0 @@ _this.registerEventListeners();

{
"name": "@harmony-js/network",
"version": "0.0.60",
"version": "0.1.0",
"description": "network suites for harmony",

@@ -21,4 +21,3 @@ "main": "dist/index.js",

"dependencies": {
"@harmony-js/core": "0.0.60",
"@harmony-js/utils": "0.0.60",
"@harmony-js/utils": "0.1.0",
"cross-fetch": "^3.0.2",

@@ -28,3 +27,3 @@ "mitt": "^1.1.3",

},
"gitHead": "dce1b4d29ea5261dea16799fccde857c8ae365eb"
"gitHead": "2c07e706979b3c891e927e3b97a222e47b8a2f55"
}
import mitt from 'mitt';
export { mitt };
export {mitt};
// provider related

@@ -14,3 +14,3 @@ export * from './providers/baseProvider';

// rpc builder and blockchain method
export * from './rpcMethod/rpcbuilder';
export * from './rpcMethod/builder';
export * from './rpcMethod/net';

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

@@ -8,9 +8,9 @@ import {

} from '@harmony-js/utils';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { ResponseMiddleware } from './responseMiddleware';
import { HttpProvider } from '../providers/http';
import { WSProvider } from '../providers/ws';
import {JsonRpc} from '../rpcMethod/builder';
import {ResponseMiddleware} from './responseMiddleware';
import {HttpProvider} from '../providers/http';
import {WSProvider} from '../providers/ws';
// import { getResultForData } from '../util';
import { RPCMethod } from '../rpcMethod/rpc';
import { SubscribeReturns } from '../types';
import {RPCMethod} from '../rpcMethod/rpc';
import {SubscribeReturns} from '../types';

@@ -237,2 +237,2 @@ /**

}
export { Messenger };
export {Messenger};
// TODO: implement Websocket Provider
import { w3cwebsocket as W3CWebsocket } from 'websocket';
import {w3cwebsocket as W3CWebsocket} from 'websocket';
import {

@@ -9,6 +9,6 @@ BaseSocket,

} from './baseSocket';
import { isWs, isObject, isArray } from '@harmony-js/utils';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { composeMiddleware } from '../rpcMethod/net';
import { RPCRequestPayload } from '../types';
import {isWs, isObject, isArray} from '@harmony-js/utils';
import {JsonRpc} from '../rpcMethod/builder';
import {composeMiddleware} from '../rpcMethod/net';
import {RPCRequestPayload} from '../types';

@@ -272,5 +272,3 @@ class WSProvider extends BaseSocket {

return new Error(
`Validation error: Invalid JSON-RPC response ID (request: ${
payload.id
} / response: ${response.id})`,
`Validation error: Invalid JSON-RPC response ID (request: ${payload.id} / response: ${response.id})`,
);

@@ -290,2 +288,2 @@ }

export { WSProvider };
export {WSProvider};
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"declarationDir": "dist"
"outDir": "dist"
},
"include": ["src", "../../typings/**/*.d.ts"],
"references": [{ "path": "../harmony-utils" }]
"references": [{"path": "../harmony-utils"}]
}

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

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

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