Socket
Socket
Sign inDemoInstall

web3-eth

Package Overview
Dependencies
Maintainers
2
Versions
446
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

types/index.d.ts

34

package.json
{
"name": "web3-eth",
"version": "1.2.1",
"version": "1.2.2",
"description": "Web3 module to interact with the Ethereum blockchain and smart contracts.",

@@ -10,18 +10,26 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-eth",

},
"types": "types/index.d.ts",
"scripts": {
"dtslint": "dtslint types --onlyTestTsNext"
},
"main": "src/index.js",
"dependencies": {
"underscore": "1.9.1",
"web3-core": "1.2.1",
"web3-core-helpers": "1.2.1",
"web3-core-method": "1.2.1",
"web3-core-subscriptions": "1.2.1",
"web3-eth-abi": "1.2.1",
"web3-eth-accounts": "1.2.1",
"web3-eth-contract": "1.2.1",
"web3-eth-ens": "1.2.1",
"web3-eth-iban": "1.2.1",
"web3-eth-personal": "1.2.1",
"web3-net": "1.2.1",
"web3-utils": "1.2.1"
"web3-core": "1.2.2",
"web3-core-helpers": "1.2.2",
"web3-core-method": "1.2.2",
"web3-core-subscriptions": "1.2.2",
"web3-eth-abi": "1.2.2",
"web3-eth-accounts": "1.2.2",
"web3-eth-contract": "1.2.2",
"web3-eth-ens": "1.2.2",
"web3-eth-iban": "1.2.2",
"web3-eth-personal": "1.2.2",
"web3-net": "1.2.2",
"web3-utils": "1.2.2"
},
"devDependencies": {
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2"
}
}

@@ -27,3 +27,2 @@ # web3-eth

## Usage

@@ -38,6 +37,7 @@

## Types
All the typescript typings are placed in the types folder.
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js

@@ -58,2 +58,6 @@ /*

}
if (genesis.hash === '0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a' &&
id === 5) {
returnValue = 'goerli';
}
if (genesis.hash === '0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9' &&

@@ -60,0 +64,0 @@ id === 42) {

@@ -84,3 +84,109 @@ /*

var defaultBlock = 'latest';
var transactionBlockTimeout = 50;
var transactionConfirmationBlocks = 24;
var transactionPollingTimeout = 750;
var defaultChain, defaultHardfork, defaultCommon;
Object.defineProperty(this, 'defaultCommon', {
get: function () {
return defaultCommon;
},
set: function (val) {
defaultCommon = val;
// also set on the Contract object
_this.Contract.defaultCommon = defaultCommon;
// update defaultBlock
methods.forEach(function(method) {
method.defaultCommon = defaultCommon;
});
},
enumerable: true
});
Object.defineProperty(this, 'defaultHardfork', {
get: function () {
return defaultHardfork;
},
set: function (val) {
defaultHardfork = val;
// also set on the Contract object
_this.Contract.defaultHardfork = defaultHardfork;
// update defaultBlock
methods.forEach(function(method) {
method.defaultHardfork = defaultHardfork;
});
},
enumerable: true
});
Object.defineProperty(this, 'defaultChain', {
get: function () {
return defaultChain;
},
set: function (val) {
defaultChain = val;
// also set on the Contract object
_this.Contract.defaultChain = defaultChain;
// update defaultBlock
methods.forEach(function(method) {
method.defaultChain = defaultChain;
});
},
enumerable: true
});
Object.defineProperty(this, 'transactionPollingTimeout', {
get: function () {
return transactionPollingTimeout;
},
set: function (val) {
transactionPollingTimeout = val;
// also set on the Contract object
_this.Contract.transactionPollingTimeout = transactionPollingTimeout;
// update defaultBlock
methods.forEach(function(method) {
method.transactionPollingTimeout = transactionPollingTimeout;
});
},
enumerable: true
});
Object.defineProperty(this, 'transactionConfirmationBlocks', {
get: function () {
return transactionConfirmationBlocks;
},
set: function (val) {
transactionConfirmationBlocks = val;
// also set on the Contract object
_this.Contract.transactionConfirmationBlocks = transactionConfirmationBlocks;
// update defaultBlock
methods.forEach(function(method) {
method.transactionConfirmationBlocks = transactionConfirmationBlocks;
});
},
enumerable: true
});
Object.defineProperty(this, 'transactionBlockTimeout', {
get: function () {
return transactionBlockTimeout;
},
set: function (val) {
transactionBlockTimeout = val;
// also set on the Contract object
_this.Contract.transactionBlockTimeout = transactionBlockTimeout;
// update defaultBlock
methods.forEach(function(method) {
method.transactionBlockTimeout = transactionBlockTimeout;
});
},
enumerable: true
});
Object.defineProperty(this, 'defaultAccount', {

@@ -177,2 +283,5 @@ get: function () {

this.Contract.defaultBlock = this.defaultBlock;
this.Contract.transactionBlockTimeout = this.transactionBlockTimeout;
this.Contract.transactionConfirmationBlocks = this.transactionConfirmationBlocks;
this.Contract.transactionPollingTimeout = this.transactionPollingTimeout;
this.Contract.setProvider(this.currentProvider, this.accounts);

@@ -373,2 +482,8 @@

}),
new Method({
name: 'getChainId',
call: 'eth_chainId',
params: 0,
outputFormatter: utils.hexToNumber
}),

@@ -461,2 +576,5 @@ // subscriptions

method.defaultAccount = _this.defaultAccount;
method.transactionBlockTimeout = _this.transactionBlockTimeout;
method.transactionConfirmationBlocks = _this.transactionConfirmationBlocks;
method.transactionPollingTimeout = _this.transactionPollingTimeout;
});

@@ -463,0 +581,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc