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

web3-providers-ws

Package Overview
Dependencies
Maintainers
4
Versions
441
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.32c8cc8.0 to 4.0.9-dev.376f192.0

4

lib/commonjs/index.d.ts

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

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

@@ -57,3 +59,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[];
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse<import("web3-types").JsonRpcResult, import("web3-types").JsonRpcResult>[];
protected _addSocketListeners(): void;

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

@@ -62,6 +62,2 @@ "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;
}
/**

@@ -78,2 +74,6 @@ * 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,6 +56,2 @@ /*

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;
}
/**

@@ -72,2 +68,6 @@ * 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)) {

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

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

@@ -57,3 +59,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[];
protected _parseResponses(event: WebSocket.MessageEvent): import("web3-types").JsonRpcResponse<import("web3-types").JsonRpcResult, import("web3-types").JsonRpcResult>[];
protected _addSocketListeners(): void;

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

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

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

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

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

"isomorphic-ws": "^5.0.0",
"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",
"web3-errors": "1.3.1-dev.376f192.0+376f192",
"web3-types": "1.8.2-dev.376f192.0+376f192",
"web3-utils": "4.3.3-dev.376f192.0+376f192",
"ws": "^8.17.1"
},
"gitHead": "32c8cc8cc8cdf0dc6c2e331b6463bccef37c3ce6"
"gitHead": "376f19259deae5424ccc8274f2d7c978456905e0"
}

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