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

web3-rpc-methods

Package Overview
Dependencies
Maintainers
4
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-rpc-methods - npm Package Compare versions

Comparing version 1.0.3-dev.8958413.0 to 1.0.3-dev.0ee9bb4.0

2

lib/commonjs/eth_rpc_methods.d.ts
import { Web3RequestManager } from 'web3-core';
import { Address, BlockNumberOrTag, Filter, HexString32Bytes, HexString8Bytes, HexStringBytes, TransactionCallAPI, TransactionWithSenderAPI, Uint, Uint256, Web3EthExecutionAPI } from 'web3-types';
import { Eip712TypedData } from 'web3-types/src/eth_types';
export declare function getProtocolVersion(requestManager: Web3RequestManager): Promise<string>;

@@ -54,1 +55,2 @@ export declare function getSyncing(requestManager: Web3RequestManager): Promise<import("web3-types").SyncingStatusAPI>;

export declare function createAccessList(requestManager: Web3RequestManager, transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag): Promise<any>;
export declare function signTypedData(requestManager: Web3RequestManager, address: Address, typedData: Eip712TypedData, useLegacy?: boolean): Promise<string>;

@@ -13,3 +13,3 @@ "use strict";

exports.getNodeInfo = exports.getProof = exports.getChainId = exports.requestAccounts = exports.getPendingTransactions = exports.getFeeHistory = exports.submitHashrate = exports.submitWork = exports.getWork = exports.getLogs = exports.getFilterLogs = exports.getFilterChanges = exports.uninstallFilter = exports.newPendingTransactionFilter = exports.newBlockFilter = exports.newFilter = exports.compileSerpent = exports.compileLLL = exports.compileSolidity = exports.getCompilers = exports.getUncleByBlockNumberAndIndex = exports.getUncleByBlockHashAndIndex = exports.getTransactionReceipt = exports.getTransactionByBlockNumberAndIndex = exports.getTransactionByBlockHashAndIndex = exports.getTransactionByHash = exports.getBlockByNumber = exports.getBlockByHash = exports.estimateGas = exports.call = exports.sendRawTransaction = exports.sendTransaction = exports.signTransaction = exports.sign = exports.getCode = exports.getUncleCountByBlockNumber = exports.getUncleCountByBlockHash = exports.getBlockTransactionCountByNumber = exports.getBlockTransactionCountByHash = exports.getTransactionCount = exports.getStorageAt = exports.getBalance = exports.getBlockNumber = exports.getAccounts = exports.getGasPrice = exports.getHashRate = exports.getMining = exports.getCoinbase = exports.getSyncing = exports.getProtocolVersion = void 0;
exports.createAccessList = void 0;
exports.signTypedData = exports.createAccessList = void 0;
const web3_validator_1 = require("web3-validator");

@@ -522,2 +522,13 @@ function getProtocolVersion(requestManager) {

exports.createAccessList = createAccessList;
function signTypedData(requestManager, address, typedData, useLegacy = false) {
return __awaiter(this, void 0, void 0, function* () {
// TODO Add validation for typedData
web3_validator_1.validator.validate(['address'], [address]);
return requestManager.send({
method: `eth_signTypedData${useLegacy ? '' : '_v4'}`,
params: [address, typedData],
});
});
}
exports.signTypedData = signTypedData;
//# sourceMappingURL=eth_rpc_methods.js.map

@@ -466,2 +466,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
export function signTypedData(requestManager, address, typedData, useLegacy = false) {
return __awaiter(this, void 0, void 0, function* () {
// TODO Add validation for typedData
validator.validate(['address'], [address]);
return requestManager.send({
method: `eth_signTypedData${useLegacy ? '' : '_v4'}`,
params: [address, typedData],
});
});
}
//# sourceMappingURL=eth_rpc_methods.js.map
import { Web3RequestManager } from 'web3-core';
import { Address, BlockNumberOrTag, Filter, HexString32Bytes, HexString8Bytes, HexStringBytes, TransactionCallAPI, TransactionWithSenderAPI, Uint, Uint256, Web3EthExecutionAPI } from 'web3-types';
import { Eip712TypedData } from 'web3-types/src/eth_types';
export declare function getProtocolVersion(requestManager: Web3RequestManager): Promise<string>;

@@ -54,2 +55,3 @@ export declare function getSyncing(requestManager: Web3RequestManager): Promise<import("web3-types").SyncingStatusAPI>;

export declare function createAccessList(requestManager: Web3RequestManager, transaction: TransactionWithSenderAPI | Partial<TransactionWithSenderAPI>, blockNumber: BlockNumberOrTag): Promise<any>;
export declare function signTypedData(requestManager: Web3RequestManager, address: Address, typedData: Eip712TypedData, useLegacy?: boolean): Promise<string>;
//# sourceMappingURL=eth_rpc_methods.d.ts.map

10

package.json
{
"name": "web3-rpc-methods",
"version": "1.0.3-dev.8958413.0+8958413",
"version": "1.0.3-dev.0ee9bb4.0+0ee9bb4",
"description": "Ethereum RPC methods for Web3 4.x.x",

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

"dependencies": {
"web3-core": "4.0.4-dev.8958413.0+8958413",
"web3-types": "1.0.3-dev.8958413.0+8958413",
"web3-validator": "1.0.3-dev.8958413.0+8958413"
"web3-core": "4.0.4-dev.0ee9bb4.0+0ee9bb4",
"web3-types": "1.0.3-dev.0ee9bb4.0+0ee9bb4",
"web3-validator": "1.0.3-dev.0ee9bb4.0+0ee9bb4"
},
"gitHead": "895841323e561518b6b90b4bddcfa536d56df1a3"
"gitHead": "0ee9bb46dc5f401abeaf19c43c5e952d26981e21"
}

@@ -31,2 +31,3 @@ /*

} from 'web3-types';
import { Eip712TypedData } from 'web3-types/src/eth_types';
import { validator } from 'web3-validator';

@@ -579,1 +580,16 @@

}
export async function signTypedData(
requestManager: Web3RequestManager,
address: Address,
typedData: Eip712TypedData,
useLegacy = false,
): Promise<string> {
// TODO Add validation for typedData
validator.validate(['address'], [address]);
return requestManager.send({
method: `eth_signTypedData${useLegacy ? '' : '_v4'}`,
params: [address, typedData],
});
}

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

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