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
484
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.56d4aec.0 to 4.0.9-dev.594f83a.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.56d4aec.0+56d4aec",
"version": "4.0.9-dev.594f83a.0+594f83a",
"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.56d4aec.0+56d4aec"
"typescript": "^5.5.4",
"web3-providers-http": "4.2.1-dev.594f83a.0+594f83a"
},

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

"isomorphic-ws": "^5.0.0",
"web3-errors": "1.3.1-dev.56d4aec.0+56d4aec",
"web3-types": "1.9.1-dev.56d4aec.0+56d4aec",
"web3-utils": "4.3.3-dev.56d4aec.0+56d4aec",
"web3-errors": "1.3.2-dev.594f83a.0+594f83a",
"web3-types": "1.10.1-dev.594f83a.0+594f83a",
"web3-utils": "4.3.4-dev.594f83a.0+594f83a",
"ws": "^8.17.1"
},
"gitHead": "56d4aec22972320bb1a4ac2ce2a9cb88a569a12a"
"gitHead": "594f83aa9a39e4c12d182ead45d6150e3361f63c"
}

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