Comparing version 4.0.8-dev.4778a0c.0 to 4.0.8-dev.526c6f5.0
import { Web3Context } from 'web3-core'; | ||
import { DataFormat, DEFAULT_RETURN_FORMAT, Web3NetAPI } from 'web3-types'; | ||
/** | ||
* 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()); | ||
* ``` | ||
*/ | ||
export declare class Net extends Web3Context<Web3NetAPI> { | ||
@@ -4,0 +24,0 @@ /** |
@@ -55,2 +55,22 @@ "use strict"; | ||
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()); | ||
* ``` | ||
*/ | ||
class Net extends web3_core_1.Web3Context { | ||
@@ -57,0 +77,0 @@ /** |
@@ -29,2 +29,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
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()); | ||
* ``` | ||
*/ | ||
export class Net extends Web3Context { | ||
@@ -31,0 +51,0 @@ /** |
import { Web3Context } from 'web3-core'; | ||
import { DataFormat, DEFAULT_RETURN_FORMAT, Web3NetAPI } from 'web3-types'; | ||
/** | ||
* 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()); | ||
* ``` | ||
*/ | ||
export declare class Net extends Web3Context<Web3NetAPI> { | ||
@@ -4,0 +24,0 @@ /** |
{ | ||
"name": "web3-net", | ||
"version": "4.0.8-dev.4778a0c.0+4778a0c", | ||
"version": "4.0.8-dev.526c6f5.0+526c6f5", | ||
"description": "Web3 module to interact with the Ethereum nodes networking properties.", | ||
@@ -52,15 +52,15 @@ "main": "./lib/commonjs/index.js", | ||
"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.2-dev.4778a0c.0+4778a0c", | ||
"web3-rpc-methods": "1.1.4-dev.4778a0c.0+4778a0c", | ||
"web3-types": "1.3.2-dev.4778a0c.0+4778a0c", | ||
"web3-utils": "4.0.8-dev.4778a0c.0+4778a0c" | ||
"web3-core": "4.3.3-dev.526c6f5.0+526c6f5", | ||
"web3-rpc-methods": "1.2.1-dev.526c6f5.0+526c6f5", | ||
"web3-types": "1.5.1-dev.526c6f5.0+526c6f5", | ||
"web3-utils": "4.2.3-dev.526c6f5.0+526c6f5" | ||
}, | ||
"gitHead": "4778a0ccf98fce3105f5e688f3fca10099a6e63d" | ||
"gitHead": "526c6f518f6a23438907b119aadbc868b06fbcd6" | ||
} |
@@ -22,2 +22,22 @@ /* | ||
/** | ||
* 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()); | ||
* ``` | ||
*/ | ||
export class Net extends Web3Context<Web3NetAPI> { | ||
@@ -24,0 +44,0 @@ /** |
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
40628
777