web3-providers-ws
Advanced tools
Comparing version 4.0.9-dev.56d4aec.0 to 4.0.9-dev.594f83a.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
15
35521
545