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

web3-providers-ws

Package Overview
Dependencies
Maintainers
2
Versions
454
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-providers-ws - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

LICENSE

9

package.json
{
"name": "web3-providers-ws",
"version": "1.2.2",
"version": "1.2.3",
"description": "Module to handle web3 RPC connections over WebSockets.",

@@ -16,5 +16,5 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws",

"dependencies": {
"@web3-js/websocket": "^1.0.29",
"underscore": "1.9.1",
"web3-core-helpers": "1.2.2",
"websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis"
"web3-core-helpers": "1.2.3"
},

@@ -24,3 +24,4 @@ "devDependencies": {

"dtslint": "0.4.2"
}
},
"gitHead": "aca6a78b6c8182f175aa059e7ad359f109ec7a84"
}

@@ -23,38 +23,4 @@ /*

import {
JsonRpcPayload,
WebsocketProviderBase,
WebsocketProviderOptions
} from 'web3-core-helpers';
import { WebsocketProviderBase } from 'web3-core-helpers';
export class WebsocketProvider extends WebsocketProviderBase {
constructor(host: string, options?: WebsocketProviderOptions);
isConnecting(): boolean;
responseCallbacks: any;
notificationCallbacks: any;
connected: boolean;
connection: any;
addDefaultEvents(): void;
supportsSubscriptions(): boolean;
send(
payload: JsonRpcPayload,
callback: (error: Error, result: any) => void
): void;
on(type: string, callback: () => void): void;
once(type: string, callback: () => void): void;
removeListener(type: string, callback: () => void): void;
removeAllListeners(type: string): void;
reset(): void;
disconnect(code: number, reason: string): void;
}
export class WebsocketProvider extends WebsocketProviderBase { }

@@ -23,3 +23,3 @@ /*

import { WebsocketProviderOptions } from 'web3-core-helpers';
import { WebsocketProviderOptions, JsonRpcResponse } from 'web3-core-helpers';
import { WebsocketProvider } from 'web3-providers';

@@ -64,5 +64,8 @@

// $ExpectType void
wsProvider.send({} as any, () => {});
wsProvider.send({} as any, (error: Error | null) => {});
// $ExpectType void
wsProvider.send({} as any, (error: Error | null, result: JsonRpcResponse | undefined) => {});
// $ExpectType void
wsProvider.on('type', () => {});

@@ -69,0 +72,0 @@

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