Comparing version 4.0.8-dev.fa4c72b.0 to 4.1.0
@@ -5,20 +5,20 @@ import { Web3Context } from 'web3-core'; | ||
* Net class allows you to interact with an Ethereum node’s network properties. | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
export declare class Net extends Web3Context<Web3NetAPI> { | ||
@@ -25,0 +25,0 @@ /** |
@@ -53,24 +53,23 @@ "use strict"; | ||
const web3_core_1 = require("web3-core"); | ||
const web3_types_1 = require("web3-types"); | ||
const rpcMethodsWrappers = __importStar(require("./rpc_method_wrappers.js")); | ||
/** | ||
* Net class allows you to interact with an Ethereum node’s network properties. | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
class Net extends web3_core_1.Web3Context { | ||
@@ -89,3 +88,3 @@ /** | ||
*/ | ||
getId(returnFormat = web3_types_1.DEFAULT_RETURN_FORMAT) { | ||
getId(returnFormat = this.defaultReturnFormat) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -107,3 +106,3 @@ return rpcMethodsWrappers.getId(this, returnFormat); | ||
*/ | ||
getPeerCount(returnFormat = web3_types_1.DEFAULT_RETURN_FORMAT) { | ||
getPeerCount(returnFormat = this.defaultReturnFormat) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -110,0 +109,0 @@ return rpcMethodsWrappers.getPeerCount(this, returnFormat); |
@@ -27,24 +27,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { Web3Context } from 'web3-core'; | ||
import { DEFAULT_RETURN_FORMAT } from 'web3-types'; | ||
import * as rpcMethodsWrappers from './rpc_method_wrappers.js'; | ||
/** | ||
* Net class allows you to interact with an Ethereum node’s network properties. | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
export class Net extends Web3Context { | ||
@@ -63,3 +62,3 @@ /** | ||
*/ | ||
getId(returnFormat = DEFAULT_RETURN_FORMAT) { | ||
getId(returnFormat = this.defaultReturnFormat) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -81,3 +80,3 @@ return rpcMethodsWrappers.getId(this, returnFormat); | ||
*/ | ||
getPeerCount(returnFormat = DEFAULT_RETURN_FORMAT) { | ||
getPeerCount(returnFormat = this.defaultReturnFormat) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -84,0 +83,0 @@ return rpcMethodsWrappers.getPeerCount(this, returnFormat); |
@@ -5,20 +5,20 @@ import { Web3Context } from 'web3-core'; | ||
* Net class allows you to interact with an Ethereum node’s network properties. | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
export declare class Net extends Web3Context<Web3NetAPI> { | ||
@@ -25,0 +25,0 @@ /** |
{ | ||
"name": "web3-net", | ||
"version": "4.0.8-dev.fa4c72b.0+fa4c72b", | ||
"version": "4.1.0", | ||
"description": "Web3 module to interact with the Ethereum nodes networking properties.", | ||
@@ -33,3 +33,3 @@ "main": "./lib/commonjs/index.js", | ||
"build:check": "node -e \"require('./lib')\"", | ||
"lint": "eslint --ext .js,.ts .", | ||
"lint": "eslint --cache --cache-strategy content --ext .ts .", | ||
"lint:fix": "eslint --fix --ext .js,.ts .", | ||
@@ -53,15 +53,15 @@ "format": "prettier --write '**/*'", | ||
"eslint-plugin-import": "^2.26.0", | ||
"jest": "^28.1.3", | ||
"jest": "^29.7.0", | ||
"jest-extended": "^3.0.1", | ||
"prettier": "^2.7.1", | ||
"ts-jest": "^28.0.7", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.7.4" | ||
}, | ||
"dependencies": { | ||
"web3-core": "4.3.3-dev.fa4c72b.0+fa4c72b", | ||
"web3-rpc-methods": "1.1.5-dev.fa4c72b.0+fa4c72b", | ||
"web3-types": "1.3.2-dev.fa4c72b.0+fa4c72b", | ||
"web3-utils": "4.1.1-dev.fa4c72b.0+fa4c72b" | ||
"web3-core": "^4.4.0", | ||
"web3-rpc-methods": "^1.3.0", | ||
"web3-types": "^1.6.0", | ||
"web3-utils": "^4.3.0" | ||
}, | ||
"gitHead": "fa4c72b33f5ec7a0ca8f79f74e788a1a79b9a5d7" | ||
"gitHead": "506799287d70f866a5ff65df611a8be7161fae51" | ||
} |
@@ -24,20 +24,20 @@ /* | ||
* Net class allows you to interact with an Ethereum node’s network properties. | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
* For using Net package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that Net features can be used. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* const web3 = new Web3('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* | ||
* console.log(await web3.eth.net.getId()); | ||
* | ||
* ``` | ||
* For using individual package install `web3-net` packages using: `npm i web3-net` or `yarn add web3-net`. | ||
* | ||
* ```ts | ||
* import {Net} from 'web3-net'; | ||
* | ||
* const net = new Net('https://mainnet.infura.io/v3/<YOURPROJID>'); | ||
* console.log(await net.getId()); | ||
* ``` | ||
*/ | ||
export class Net extends Web3Context<Web3NetAPI> { | ||
@@ -57,3 +57,3 @@ /** | ||
public async getId<ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT>( | ||
returnFormat: ReturnFormat = DEFAULT_RETURN_FORMAT as ReturnFormat, | ||
returnFormat: ReturnFormat = this.defaultReturnFormat as ReturnFormat, | ||
) { | ||
@@ -76,3 +76,3 @@ return rpcMethodsWrappers.getId(this, returnFormat); | ||
public async getPeerCount<ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT>( | ||
returnFormat: ReturnFormat = DEFAULT_RETURN_FORMAT as ReturnFormat, | ||
returnFormat: ReturnFormat = this.defaultReturnFormat as ReturnFormat, | ||
) { | ||
@@ -79,0 +79,0 @@ return rpcMethodsWrappers.getPeerCount(this, returnFormat); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
1
40517
775
+ 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.5.5(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-core@4.6.0(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-rpc-methods@1.3.0(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-core@^4.4.0
Updatedweb3-rpc-methods@^1.3.0
Updatedweb3-types@^1.6.0
Updatedweb3-utils@^4.3.0