🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

web3-net

Package Overview
Dependencies
Maintainers
4
Versions
507
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-net - npm Package Compare versions

Comparing version

to
4.0.8-dev.7be0060.0

36

lib/commonjs/net.d.ts

@@ -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.7b97011.0+7b97011",
"version": "4.0.8-dev.7be0060.0+7be0060",
"description": "Web3 module to interact with the Ethereum nodes networking properties.",

@@ -59,8 +59,8 @@ "main": "./lib/commonjs/index.js",

"dependencies": {
"web3-core": "4.3.3-dev.7b97011.0+7b97011",
"web3-rpc-methods": "1.1.5-dev.7b97011.0+7b97011",
"web3-types": "1.3.2-dev.7b97011.0+7b97011",
"web3-utils": "4.1.2-dev.7b97011.0+7b97011"
"web3-core": "4.3.3-dev.7be0060.0+7be0060",
"web3-rpc-methods": "1.2.1-dev.7be0060.0+7be0060",
"web3-types": "1.6.1-dev.7be0060.0+7be0060",
"web3-utils": "4.2.4-dev.7be0060.0+7be0060"
},
"gitHead": "7b97011a292f934ac33ef5b47a9201bf78507295"
"gitHead": "7be0060ff457119bdbb642afcafa3bbe651fd31a"
}

@@ -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