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

web3-providers-ws

Package Overview
Dependencies
Maintainers
4
Versions
464
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 4.0.9-dev.2f24244.0 to 4.0.9-dev.32c8cc8.0

lib/commonjs/tsconfig.cjs.tsbuildinfo

4

lib/commonjs/index.d.ts

@@ -1,3 +0,1 @@

/// <reference types="ws" />
/// <reference types="node" />
import { ClientRequestArgs } from 'http';

@@ -59,3 +57,3 @@ import WebSocket, { ClientOptions, CloseEvent } from 'isomorphic-ws';

protected _sendToSocket<Method extends Web3APIMethod<API>>(payload: Web3APIPayload<API, Method>): void;
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse<import("web3-types").JsonRpcResult, import("web3-types").JsonRpcResult>[];
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse[];
protected _addSocketListeners(): void;

@@ -62,0 +60,0 @@ protected _removeSocketListeners(): void;

@@ -62,2 +62,6 @@ "use strict";

class WebSocketProvider extends web3_utils_1.SocketProvider {
// eslint-disable-next-line class-methods-use-this
_validateProviderPath(providerUrl) {
return typeof providerUrl === 'string' ? /^ws(s)?:\/\//i.test(providerUrl) : false;
}
/**

@@ -74,6 +78,2 @@ * This is a class used for Web Socket connections. It extends the abstract class SocketProvider {@link SocketProvider} that extends the EIP-1193 provider {@link EIP1193Provider}.

}
// eslint-disable-next-line class-methods-use-this
_validateProviderPath(providerUrl) {
return typeof providerUrl === 'string' ? /^ws(s)?:\/\//i.test(providerUrl) : false;
}
getStatus() {

@@ -80,0 +80,0 @@ if (this._socketConnection && !(0, web3_utils_1.isNullish)(this._socketConnection)) {

@@ -56,2 +56,6 @@ /*

export default class WebSocketProvider extends SocketProvider {
// eslint-disable-next-line class-methods-use-this
_validateProviderPath(providerUrl) {
return typeof providerUrl === 'string' ? /^ws(s)?:\/\//i.test(providerUrl) : false;
}
/**

@@ -68,6 +72,2 @@ * This is a class used for Web Socket connections. It extends the abstract class SocketProvider {@link SocketProvider} that extends the EIP-1193 provider {@link EIP1193Provider}.

}
// eslint-disable-next-line class-methods-use-this
_validateProviderPath(providerUrl) {
return typeof providerUrl === 'string' ? /^ws(s)?:\/\//i.test(providerUrl) : false;
}
getStatus() {

@@ -74,0 +74,0 @@ if (this._socketConnection && !isNullish(this._socketConnection)) {

@@ -1,3 +0,1 @@

/// <reference types="ws" />
/// <reference types="node" />
import { ClientRequestArgs } from 'http';

@@ -59,3 +57,3 @@ import WebSocket, { ClientOptions, CloseEvent } from 'isomorphic-ws';

protected _sendToSocket<Method extends Web3APIMethod<API>>(payload: Web3APIPayload<API, Method>): void;
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse<import("web3-types").JsonRpcResult, import("web3-types").JsonRpcResult>[];
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse[];
protected _addSocketListeners(): void;

@@ -62,0 +60,0 @@ protected _removeSocketListeners(): void;

{
"name": "web3-providers-ws",
"version": "4.0.9-dev.2f24244.0+2f24244",
"version": "4.0.9-dev.32c8cc8.0+32c8cc8",
"description": "Websocket provider for Web3 4.x.x",

@@ -61,4 +61,4 @@ "main": "./lib/commonjs/index.js",

"ts-jest": "^29.1.1",
"typescript": "^4.7.4",
"web3-providers-http": "4.2.1-dev.2f24244.0+2f24244"
"typescript": "^5.5.4",
"web3-providers-http": "4.2.1-dev.32c8cc8.0+32c8cc8"
},

@@ -68,8 +68,8 @@ "dependencies": {

"isomorphic-ws": "^5.0.0",
"web3-errors": "1.3.1-dev.2f24244.0+2f24244",
"web3-types": "1.7.1-dev.2f24244.0+2f24244",
"web3-utils": "4.3.2-dev.2f24244.0+2f24244",
"web3-errors": "1.3.1-dev.32c8cc8.0+32c8cc8",
"web3-types": "1.8.1-dev.32c8cc8.0+32c8cc8",
"web3-utils": "4.3.2-dev.32c8cc8.0+32c8cc8",
"ws": "^8.17.1"
},
"gitHead": "2f2424487a6ba2865b5a381f22f83500a3133cda"
"gitHead": "32c8cc8cc8cdf0dc6c2e331b6463bccef37c3ce6"
}

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