web3-rpc-providers
Advanced tools
Comparing version 1.0.0-dev.56d4aec.0 to 1.0.0-dev.594f83a.0
@@ -1,3 +0,1 @@ | ||
/// <reference types="ws" /> | ||
/// <reference types="node" /> | ||
import { ClientOptions, ClientRequestArgs } from 'web3-providers-ws'; | ||
@@ -66,5 +64,5 @@ import { ReconnectOptions } from 'web3-utils'; | ||
} | ||
export declare type SocketOptions = { | ||
export type SocketOptions = { | ||
socketOptions?: ClientOptions | ClientRequestArgs; | ||
reconnectOptions?: Partial<ReconnectOptions>; | ||
}; |
@@ -24,3 +24,3 @@ "use strict"; | ||
Transport["WebSocket"] = "wss"; | ||
})(Transport = exports.Transport || (exports.Transport = {})); | ||
})(Transport || (exports.Transport = Transport = {})); | ||
var Network; | ||
@@ -83,3 +83,3 @@ (function (Network) { | ||
Network["BERACHAIN_TESTNET"] = "berachain_testnet"; | ||
})(Network = exports.Network || (exports.Network = {})); | ||
})(Network || (exports.Network = Network = {})); | ||
//# sourceMappingURL=types.js.map |
@@ -82,5 +82,6 @@ "use strict"; | ||
var _a; | ||
if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.once) | ||
if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.once) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.once(_type, _listener); | ||
} | ||
} | ||
@@ -114,3 +115,2 @@ removeAllListeners(_type) { | ||
if (this.provider) | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.removeListener(_type, _listener); | ||
@@ -117,0 +117,0 @@ } |
@@ -76,5 +76,6 @@ /* | ||
var _a; | ||
if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.once) | ||
if ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.once) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.once(_type, _listener); | ||
} | ||
} | ||
@@ -108,3 +109,2 @@ removeAllListeners(_type) { | ||
if (this.provider) | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.removeListener(_type, _listener); | ||
@@ -111,0 +111,0 @@ } |
@@ -1,3 +0,1 @@ | ||
/// <reference types="ws" /> | ||
/// <reference types="node" /> | ||
import { ClientOptions, ClientRequestArgs } from 'web3-providers-ws'; | ||
@@ -66,3 +64,3 @@ import { ReconnectOptions } from 'web3-utils'; | ||
} | ||
export declare type SocketOptions = { | ||
export type SocketOptions = { | ||
socketOptions?: ClientOptions | ClientRequestArgs; | ||
@@ -69,0 +67,0 @@ reconnectOptions?: Partial<ReconnectOptions>; |
{ | ||
"name": "web3-rpc-providers", | ||
"version": "1.0.0-dev.56d4aec.0+56d4aec", | ||
"version": "1.0.0-dev.594f83a.0+594f83a", | ||
"description": "Web3 Providers package", | ||
@@ -57,13 +57,13 @@ "main": "./lib/commonjs/index.js", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.7.4" | ||
"typescript": "^5.5.4" | ||
}, | ||
"dependencies": { | ||
"web3-errors": "1.3.1-dev.56d4aec.0+56d4aec", | ||
"web3-providers-http": "4.2.1-dev.56d4aec.0+56d4aec", | ||
"web3-providers-ws": "4.0.9-dev.56d4aec.0+56d4aec", | ||
"web3-types": "1.9.1-dev.56d4aec.0+56d4aec", | ||
"web3-utils": "4.3.3-dev.56d4aec.0+56d4aec", | ||
"web3-validator": "2.0.7-dev.56d4aec.0+56d4aec" | ||
"web3-errors": "1.3.2-dev.594f83a.0+594f83a", | ||
"web3-providers-http": "4.2.1-dev.594f83a.0+594f83a", | ||
"web3-providers-ws": "4.0.9-dev.594f83a.0+594f83a", | ||
"web3-types": "1.10.1-dev.594f83a.0+594f83a", | ||
"web3-utils": "4.3.4-dev.594f83a.0+594f83a", | ||
"web3-validator": "2.0.7-dev.594f83a.0+594f83a" | ||
}, | ||
"gitHead": "56d4aec22972320bb1a4ac2ce2a9cb88a569a12a" | ||
"gitHead": "594f83aa9a39e4c12d182ead45d6150e3361f63c" | ||
} |
@@ -144,5 +144,11 @@ /* | ||
public once(_type: string, _listener: unknown): void { | ||
if (this.provider?.once) | ||
if (this.provider?.once) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.once(_type, _listener as any); | ||
this.provider.once( | ||
_type, | ||
_listener as | ||
| Web3Eip1193ProviderEventCallback<ProviderMessage> | ||
| Web3ProviderEventCallback, | ||
); | ||
} | ||
} | ||
@@ -187,3 +193,8 @@ public removeAllListeners?(_type: string): void { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.on(_type as any, _listener as any); | ||
this.provider.on( | ||
_type as string, | ||
_listener as | ||
| Web3Eip1193ProviderEventCallback<ProviderMessage> | ||
| Web3ProviderMessageEventCallback, | ||
); | ||
} | ||
@@ -212,5 +223,9 @@ public removeListener( | ||
if (this.provider) | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
this.provider.removeListener(_type as any, _listener as any); | ||
this.provider.removeListener( | ||
_type as string, | ||
_listener as | ||
| Web3Eip1193ProviderEventCallback<ProviderMessage> | ||
| Web3ProviderEventCallback, | ||
); | ||
} | ||
} |
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
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
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
117936
55
1732