web3-providers-ws
Advanced tools
Comparing version 4.0.9-dev.2f24244.0 to 4.0.9-dev.32c8cc8.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.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
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
35520
545