Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web3-eth

Package Overview
Dependencies
Maintainers
2
Versions
486
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.0.0-beta.52 to 1.0.0-beta.53

38

dist/web3-eth.cjs.js

@@ -44,3 +44,3 @@ 'use strict';

_regeneratorRuntime.mark(function _callee(transaction, privateKey) {
var ethTx, validationResult, rlpEncoded, rawTransaction;
var ethTx, validationResult, rlpEncoded, rawTransaction, transactionHash;
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -70,2 +70,3 @@ while (1) {

rawTransaction = '0x' + rlpEncoded;
transactionHash = this.utils.keccak256(rawTransaction);
return _context.abrupt("return", {

@@ -76,5 +77,6 @@ messageHash: Buffer.from(ethTx.hash(false)).toString('hex'),

s: '0x' + Buffer.from(ethTx.s).toString('hex'),
rawTransaction: rawTransaction
rawTransaction: rawTransaction,
transactionHash: transactionHash
});
case 11:
case 12:
case "end":

@@ -84,3 +86,3 @@ return _context.stop();

}
}, _callee);
}, _callee, this);
}));

@@ -251,14 +253,22 @@ function sign(_x, _x2) {

signedMessage = this.moduleInstance.accounts.sign(this.parameters[1], this.moduleInstance.accounts.wallet[this.parameters[0]].privateKey);
if (this.callback) {
this.callback(false, signedMessage);
if (!this.callback) {
_context.next = 6;
break;
}
this.callback(false, signedMessage);
return _context.abrupt("return");
case 6:
return _context.abrupt("return", signedMessage);
case 7:
_context.prev = 7;
case 9:
_context.prev = 9;
_context.t0 = _context["catch"](0);
if (this.callback) {
this.callback(_context.t0, null);
if (!this.callback) {
_context.next = 14;
break;
}
this.callback(_context.t0, null);
return _context.abrupt("return");
case 14:
throw _context.t0;
case 11:
case 15:
case "end":

@@ -268,3 +278,3 @@ return _context.stop();

}
}, _callee, this, [[0, 7]]);
}, _callee, this, [[0, 9]]);
}));

@@ -328,2 +338,3 @@ function signLocally() {

getTransaction: web3CoreMethod.GetTransactionMethod,
getPendingTransactions: web3CoreMethod.GetPendingTransactionsMethod,
getTransactionFromBlock: GetTransactionFromBlockMethod,

@@ -343,3 +354,4 @@ getTransactionReceipt: web3CoreMethod.GetTransactionReceiptMethod,

getId: web3CoreMethod.VersionMethod,
getChainId: web3CoreMethod.ChainIdMethod
getChainId: web3CoreMethod.ChainIdMethod,
getProof: web3CoreMethod.GetProofMethod
};

@@ -346,0 +358,0 @@ return _this;

@@ -11,3 +11,3 @@ import { formatters } from 'web3-core-helpers';

import EthereumTx from 'ethereumjs-tx';
import { AbstractGetBlockMethod, AbstractGetUncleMethod, AbstractGetBlockTransactionCountMethod, AbstractGetBlockUncleCountMethod, AbstractGetTransactionFromBlockMethod, SignTransactionMethod, SignMethod, GetAccountsMethod, AbstractMethodFactory, GetNodeInfoMethod, GetProtocolVersionMethod, GetCoinbaseMethod, IsMiningMethod, GetHashrateMethod, IsSyncingMethod, GetGasPriceMethod, GetBlockNumberMethod, GetBalanceMethod, GetStorageAtMethod, GetCodeMethod, GetTransactionMethod, GetTransactionReceiptMethod, GetTransactionCountMethod, SendRawTransactionMethod, EthSendTransactionMethod, CallMethod, EstimateGasMethod, SubmitWorkMethod, GetWorkMethod, GetPastLogsMethod, RequestAccountsMethod, VersionMethod, ChainIdMethod } from 'web3-core-method';
import { AbstractGetBlockMethod, AbstractGetUncleMethod, AbstractGetBlockTransactionCountMethod, AbstractGetBlockUncleCountMethod, AbstractGetTransactionFromBlockMethod, SignTransactionMethod, SignMethod, GetAccountsMethod, AbstractMethodFactory, GetNodeInfoMethod, GetProtocolVersionMethod, GetCoinbaseMethod, IsMiningMethod, GetHashrateMethod, IsSyncingMethod, GetGasPriceMethod, GetBlockNumberMethod, GetBalanceMethod, GetStorageAtMethod, GetCodeMethod, GetTransactionMethod, GetPendingTransactionsMethod, GetTransactionReceiptMethod, GetTransactionCountMethod, SendRawTransactionMethod, EthSendTransactionMethod, CallMethod, EstimateGasMethod, SubmitWorkMethod, GetWorkMethod, GetPastLogsMethod, RequestAccountsMethod, VersionMethod, ChainIdMethod, GetProofMethod } from 'web3-core-method';
import isString from 'lodash/isString';

@@ -41,2 +41,3 @@ import { LogSubscription, NewHeadsSubscription, NewPendingTransactionsSubscription, SyncingSubscription } from 'web3-core-subscriptions';

const rawTransaction = '0x' + rlpEncoded;
const transactionHash = this.utils.keccak256(rawTransaction);
return {

@@ -47,3 +48,4 @@ messageHash: Buffer.from(ethTx.hash(false)).toString('hex'),

s: '0x' + Buffer.from(ethTx.s).toString('hex'),
rawTransaction
rawTransaction,
transactionHash
};

@@ -147,2 +149,3 @@ }

this.callback(false, signedMessage);
return;
}

@@ -153,2 +156,3 @@ return signedMessage;

this.callback(error, null);
return;
}

@@ -197,2 +201,3 @@ throw error;

getTransaction: GetTransactionMethod,
getPendingTransactions: GetPendingTransactionsMethod,
getTransactionFromBlock: GetTransactionFromBlockMethod,

@@ -212,3 +217,4 @@ getTransactionReceipt: GetTransactionReceiptMethod,

getId: VersionMethod,
getChainId: ChainIdMethod
getChainId: ChainIdMethod,
getProof: GetProofMethod
};

@@ -215,0 +221,0 @@ }

@@ -31,3 +31,3 @@ (function (global, factory) {

_regeneratorRuntime.mark(function _callee(transaction, privateKey) {
var ethTx, validationResult, rlpEncoded, rawTransaction;
var ethTx, validationResult, rlpEncoded, rawTransaction, transactionHash;
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -57,2 +57,3 @@ while (1) {

rawTransaction = '0x' + rlpEncoded;
transactionHash = this.utils.keccak256(rawTransaction);
return _context.abrupt("return", {

@@ -63,5 +64,6 @@ messageHash: Buffer.from(ethTx.hash(false)).toString('hex'),

s: '0x' + Buffer.from(ethTx.s).toString('hex'),
rawTransaction: rawTransaction
rawTransaction: rawTransaction,
transactionHash: transactionHash
});
case 11:
case 12:
case "end":

@@ -71,3 +73,3 @@ return _context.stop();

}
}, _callee);
}, _callee, this);
}));

@@ -238,14 +240,22 @@ function sign(_x, _x2) {

signedMessage = this.moduleInstance.accounts.sign(this.parameters[1], this.moduleInstance.accounts.wallet[this.parameters[0]].privateKey);
if (this.callback) {
this.callback(false, signedMessage);
if (!this.callback) {
_context.next = 6;
break;
}
this.callback(false, signedMessage);
return _context.abrupt("return");
case 6:
return _context.abrupt("return", signedMessage);
case 7:
_context.prev = 7;
case 9:
_context.prev = 9;
_context.t0 = _context["catch"](0);
if (this.callback) {
this.callback(_context.t0, null);
if (!this.callback) {
_context.next = 14;
break;
}
this.callback(_context.t0, null);
return _context.abrupt("return");
case 14:
throw _context.t0;
case 11:
case 15:
case "end":

@@ -255,3 +265,3 @@ return _context.stop();

}
}, _callee, this, [[0, 7]]);
}, _callee, this, [[0, 9]]);
}));

@@ -315,2 +325,3 @@ function signLocally() {

getTransaction: web3CoreMethod.GetTransactionMethod,
getPendingTransactions: web3CoreMethod.GetPendingTransactionsMethod,
getTransactionFromBlock: GetTransactionFromBlockMethod,

@@ -330,3 +341,4 @@ getTransactionReceipt: web3CoreMethod.GetTransactionReceiptMethod,

getId: web3CoreMethod.VersionMethod,
getChainId: web3CoreMethod.ChainIdMethod
getChainId: web3CoreMethod.ChainIdMethod,
getProof: web3CoreMethod.GetProofMethod
};

@@ -333,0 +345,0 @@ return _this;

{
"name": "web3-eth",
"namespace": "ethereum",
"version": "1.0.0-beta.52",
"version": "1.0.0-beta.53",
"description": "Web3 module to interact with the Ethereum blockchain and smart contracts.",

@@ -22,15 +22,15 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.0/packages/web3-eth",

"rxjs": "^6.4.0",
"web3-core": "1.0.0-beta.52",
"web3-core-helpers": "1.0.0-beta.52",
"web3-core-method": "1.0.0-beta.52",
"web3-core-subscriptions": "1.0.0-beta.52",
"web3-eth-abi": "1.0.0-beta.52",
"web3-eth-accounts": "1.0.0-beta.52",
"web3-eth-contract": "1.0.0-beta.52",
"web3-eth-ens": "1.0.0-beta.52",
"web3-eth-iban": "1.0.0-beta.52",
"web3-eth-personal": "1.0.0-beta.52",
"web3-net": "1.0.0-beta.52",
"web3-providers": "1.0.0-beta.52",
"web3-utils": "1.0.0-beta.52"
"web3-core": "1.0.0-beta.53",
"web3-core-helpers": "1.0.0-beta.53",
"web3-core-method": "1.0.0-beta.53",
"web3-core-subscriptions": "1.0.0-beta.53",
"web3-eth-abi": "1.0.0-beta.53",
"web3-eth-accounts": "1.0.0-beta.53",
"web3-eth-contract": "1.0.0-beta.53",
"web3-eth-ens": "1.0.0-beta.53",
"web3-eth-iban": "1.0.0-beta.53",
"web3-eth-personal": "1.0.0-beta.53",
"web3-net": "1.0.0-beta.53",
"web3-providers": "1.0.0-beta.53",
"web3-utils": "1.0.0-beta.53"
},

@@ -45,3 +45,3 @@ "devDependencies": {

],
"gitHead": "1c89f503c90180598910d29892f6ebf92455cfe1"
"gitHead": "d955a98a5fc8819ff866254ff7141a10b503b5cd"
}
# web3-eth
This is a sub package of [web3.js][repo]
This is a sub module of [web3.js][repo]
This is the Eth package to be used [web3.js][repo].
This is the Eth module to be used [web3.js][repo].
Please read the [documentation][docs] for more.

@@ -7,0 +7,0 @@

@@ -16,3 +16,5 @@ /*

* @file index.d.ts
* @author Josh Stevens <joshstevens19@hotmail.co.uk>, Samuel Furter <samuel@ethereum.org>
* @author Josh Stevens <joshstevens19@hotmail.co.uk>
* @author Samuel Furter <samuel@ethereum.org>
* @author Prince Sinha <sinhaprince013@gmail.com>
* @date 2018

@@ -30,3 +32,3 @@ */

TransactionReceipt,
Web3ModuleOptions
Web3ModuleOptions,
} from 'web3-core';

@@ -126,3 +128,3 @@ import {Contract, ContractOptions} from 'web3-eth-contract';

sendSignedTransaction(signedTransactionData: string, callback?: (error: Error, gas: string) => void): PromiEvent<TransactionReceipt>
sendSignedTransaction(signedTransactionData: string, callback?: (error: Error, hash: string) => void): PromiEvent<TransactionReceipt>

@@ -147,2 +149,6 @@ sign(dataToSign: string, address: string | number, callback?: (error: Error, signature: string) => void): Promise<string>;

submitWork(data: [string, string, string], callback?: (error: Error, result: boolean) => void): Promise<boolean>;
pendingTransactions(callback?: (error: Error, result: []) => void): Promise<[]>;
getProof(address: string, storageKey: string[], blockNumber: number | string | "latest" | "earliest", callback?: (error: Error, result: GetProof) => void): Promise<GetProof>;
}

@@ -223,1 +229,21 @@

}
export interface GetProof {
jsonrpc: string;
id: number;
result: {
address: string;
accountProof: string[];
balance: string;
codeHash: string;
nonce: string;
storageHash: string;
storageProof: StorageProof[];
};
}
export interface StorageProof {
key: string;
value: string;
proof: string[];
}
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