web3-core
Advanced tools
Comparing version 4.4.1-dev.fd2982d.0 to 4.5.0
@@ -112,2 +112,4 @@ "use strict"; | ||
}); | ||
// @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>' | ||
this[ContextRef.name] = newContextChild; | ||
return newContextChild; | ||
@@ -114,0 +116,0 @@ } |
@@ -314,8 +314,2 @@ "use strict"; | ||
} | ||
if ((web3_utils_1.jsonRpc.isResponseWithError(response) || web3_utils_1.jsonRpc.isResponseWithResult(response)) && | ||
!web3_utils_1.jsonRpc.isBatchRequest(payload)) { | ||
if (response.id && payload.id !== response.id) { | ||
throw new web3_errors_1.InvalidResponseError(response); | ||
} | ||
} | ||
throw new web3_errors_1.ResponseError(response, 'Invalid response'); | ||
@@ -322,0 +316,0 @@ } |
@@ -32,3 +32,2 @@ "use strict"; | ||
const web3_utils_1 = require("web3-utils"); | ||
const web3_errors_1 = require("web3-errors"); | ||
// eslint-disable-next-line import/no-cycle | ||
@@ -44,8 +43,2 @@ const web3_subscription_manager_js_1 = require("./web3_subscription_manager.js"); | ||
const { subscriptionManager } = options; | ||
if (requestManager && subscriptionManager) { | ||
throw new web3_errors_1.SubscriptionError('Only requestManager or subscriptionManager should be provided at Subscription constructor'); | ||
} | ||
if (!requestManager && !subscriptionManager) { | ||
throw new web3_errors_1.SubscriptionError('Either requestManager or subscriptionManager should be provided at Subscription constructor'); | ||
} | ||
if (requestManager) { | ||
@@ -52,0 +45,0 @@ // eslint-disable-next-line deprecation/deprecation |
@@ -109,2 +109,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}); | ||
// @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>' | ||
this[ContextRef.name] = newContextChild; | ||
return newContextChild; | ||
@@ -111,0 +113,0 @@ } |
@@ -308,8 +308,2 @@ /* | ||
} | ||
if ((jsonRpc.isResponseWithError(response) || jsonRpc.isResponseWithResult(response)) && | ||
!jsonRpc.isBatchRequest(payload)) { | ||
if (response.id && payload.id !== response.id) { | ||
throw new InvalidResponseError(response); | ||
} | ||
} | ||
throw new ResponseError(response, 'Invalid response'); | ||
@@ -316,0 +310,0 @@ } |
@@ -29,3 +29,2 @@ /* | ||
import { jsonRpc } from 'web3-utils'; | ||
import { SubscriptionError } from 'web3-errors'; | ||
// eslint-disable-next-line import/no-cycle | ||
@@ -41,8 +40,2 @@ import { Web3SubscriptionManager } from './web3_subscription_manager.js'; | ||
const { subscriptionManager } = options; | ||
if (requestManager && subscriptionManager) { | ||
throw new SubscriptionError('Only requestManager or subscriptionManager should be provided at Subscription constructor'); | ||
} | ||
if (!requestManager && !subscriptionManager) { | ||
throw new SubscriptionError('Either requestManager or subscriptionManager should be provided at Subscription constructor'); | ||
} | ||
if (requestManager) { | ||
@@ -49,0 +42,0 @@ // eslint-disable-next-line deprecation/deprecation |
{ | ||
"name": "web3-core", | ||
"version": "4.4.1-dev.fd2982d.0+fd2982d", | ||
"version": "4.5.0", | ||
"description": "Web3 core tools for sub-packages. This is an internal package.", | ||
@@ -45,13 +45,13 @@ "main": "./lib/commonjs/index.js", | ||
"dependencies": { | ||
"web3-errors": "1.2.1-dev.fd2982d.0+fd2982d", | ||
"web3-eth-accounts": "4.1.3-dev.fd2982d.0+fd2982d", | ||
"web3-eth-iban": "4.0.8-dev.fd2982d.0+fd2982d", | ||
"web3-providers-http": "4.1.1-dev.fd2982d.0+fd2982d", | ||
"web3-providers-ws": "4.0.8-dev.fd2982d.0+fd2982d", | ||
"web3-types": "1.6.1-dev.fd2982d.0+fd2982d", | ||
"web3-utils": "4.3.1-dev.fd2982d.0+fd2982d", | ||
"web3-validator": "2.0.7-dev.fd2982d.0+fd2982d" | ||
"web3-errors": "^1.2.0", | ||
"web3-eth-accounts": "^4.1.2", | ||
"web3-eth-iban": "^4.0.7", | ||
"web3-providers-http": "^4.1.0", | ||
"web3-providers-ws": "^4.0.7", | ||
"web3-types": "^1.7.0", | ||
"web3-utils": "^4.3.0", | ||
"web3-validator": "^2.0.6" | ||
}, | ||
"optionalDependencies": { | ||
"web3-providers-ipc": "4.0.8-dev.fd2982d.0+fd2982d" | ||
"web3-providers-ipc": "^4.0.7" | ||
}, | ||
@@ -74,3 +74,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "fd2982d1afacd6bf89084324b478ec04af18052e" | ||
"gitHead": "d6d4c6df8f6b6323bc5fe277cbee969c28c845a7" | ||
} |
@@ -222,2 +222,5 @@ /* | ||
// @ts-expect-error No index signature with a parameter of type 'string' was found on type 'Web3Context<API, RegisteredSubs>' | ||
this[ContextRef.name] = newContextChild; | ||
return newContextChild; | ||
@@ -224,0 +227,0 @@ } |
@@ -432,3 +432,2 @@ /* | ||
} | ||
if (jsonRpc.isBatchRequest(payload) && !Array.isArray(response)) { | ||
@@ -442,11 +441,2 @@ throw new ResponseError(response, 'Got normal response for a batch request.'); | ||
if ( | ||
(jsonRpc.isResponseWithError(response) || jsonRpc.isResponseWithResult(response)) && | ||
!jsonRpc.isBatchRequest(payload) | ||
) { | ||
if (response.id && payload.id !== response.id) { | ||
throw new InvalidResponseError<ErrorType>(response); | ||
} | ||
} | ||
throw new ResponseError(response, 'Invalid response'); | ||
@@ -453,0 +443,0 @@ } |
@@ -33,3 +33,2 @@ /* | ||
import { jsonRpc } from 'web3-utils'; | ||
import { SubscriptionError } from 'web3-errors'; | ||
@@ -86,12 +85,2 @@ // eslint-disable-next-line import/no-cycle | ||
const { subscriptionManager } = options as { subscriptionManager: Web3SubscriptionManager }; | ||
if (requestManager && subscriptionManager) { | ||
throw new SubscriptionError( | ||
'Only requestManager or subscriptionManager should be provided at Subscription constructor', | ||
); | ||
} | ||
if (!requestManager && !subscriptionManager) { | ||
throw new SubscriptionError( | ||
'Either requestManager or subscriptionManager should be provided at Subscription constructor', | ||
); | ||
} | ||
if (requestManager) { | ||
@@ -98,0 +87,0 @@ // eslint-disable-next-line deprecation/deprecation |
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
0
479333
8450
+ Added@ethereumjs/rlp@4.0.1(transitive)
+ Added@noble/curves@1.4.2(transitive)
+ Added@noble/hashes@1.4.0(transitive)
+ Added@scure/base@1.1.9(transitive)
+ Added@scure/bip32@1.4.0(transitive)
+ Added@scure/bip39@1.3.0(transitive)
+ Added@types/node@22.7.4(transitive)
+ Added@types/ws@8.5.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcrc-32@1.2.2(transitive)
+ Addedcross-fetch@4.0.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedethereum-cryptography@2.2.1(transitive)
+ Addedeventemitter3@5.0.1(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arguments@1.1.1(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedisomorphic-ws@5.0.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedutil@0.12.5(transitive)
+ Addedweb3-errors@1.3.0(transitive)
+ Addedweb3-eth-accounts@4.2.1(transitive)
+ Addedweb3-eth-iban@4.0.7(transitive)
+ Addedweb3-providers-http@4.2.0(transitive)
+ Addedweb3-providers-ipc@4.0.7(transitive)
+ Addedweb3-providers-ws@4.0.8(transitive)
+ Addedweb3-types@1.8.0(transitive)
+ Addedweb3-utils@4.3.1(transitive)
+ Addedweb3-validator@2.0.6(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
+ Addedws@8.18.0(transitive)
+ Addedzod@3.23.8(transitive)
Updatedweb3-errors@^1.2.0
Updatedweb3-eth-accounts@^4.1.2
Updatedweb3-eth-iban@^4.0.7
Updatedweb3-providers-http@^4.1.0
Updatedweb3-providers-ws@^4.0.7
Updatedweb3-types@^1.7.0
Updatedweb3-utils@^4.3.0
Updatedweb3-validator@^2.0.6