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

web3-eth-personal

Package Overview
Dependencies
Maintainers
4
Versions
475
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-personal - npm Package Compare versions

Comparing version 4.0.9-dev.fd2982d.0 to 4.1.0

38

lib/commonjs/personal.d.ts
import { Web3Context } from 'web3-core';
import { Address, EthPersonalAPI, HexString, Transaction } from 'web3-types';
/**
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
export declare class Personal extends Web3Context<EthPersonalAPI> {

@@ -24,0 +24,0 @@ /**

@@ -55,21 +55,21 @@ "use strict";

/**
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
class Personal extends web3_core_1.Web3Context {

@@ -202,3 +202,3 @@ /**

return __awaiter(this, void 0, void 0, function* () {
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase, this.config);
});

@@ -250,3 +250,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase, this.config);
});

@@ -253,0 +253,0 @@ }

@@ -1,2 +0,2 @@

import { Web3RequestManager } from 'web3-core';
import { Web3RequestManager, Web3ConfigOptions } from 'web3-core';
import { Address, EthPersonalAPI, HexString, Transaction } from 'web3-types';

@@ -8,5 +8,5 @@ export declare const getAccounts: (requestManager: Web3RequestManager<EthPersonalAPI>) => Promise<string[]>;

export declare const importRawKey: (requestManager: Web3RequestManager<EthPersonalAPI>, keyData: HexString, passphrase: string) => Promise<string>;
export declare const sendTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string) => Promise<string>;
export declare const signTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string) => Promise<string>;
export declare const sendTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string, config?: Web3ConfigOptions) => Promise<string>;
export declare const signTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string, config?: Web3ConfigOptions) => Promise<string>;
export declare const sign: (requestManager: Web3RequestManager<EthPersonalAPI>, data: HexString, address: Address, passphrase: string) => Promise<string>;
export declare const ecRecover: (requestManager: Web3RequestManager<EthPersonalAPI>, signedData: HexString, signature: string) => Promise<string>;

@@ -44,9 +44,13 @@ "use strict";

exports.importRawKey = importRawKey;
const sendTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = (0, web3_eth_1.formatTransaction)(tx, web3_types_1.ETH_DATA_FORMAT);
const sendTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = (0, web3_eth_1.formatTransaction)(tx, web3_types_1.ETH_DATA_FORMAT, {
transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,
});
return web3_rpc_methods_1.personalRpcMethods.sendTransaction(requestManager, formattedTx, passphrase);
});
exports.sendTransaction = sendTransaction;
const signTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = (0, web3_eth_1.formatTransaction)(tx, web3_types_1.ETH_DATA_FORMAT);
const signTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = (0, web3_eth_1.formatTransaction)(tx, web3_types_1.ETH_DATA_FORMAT, {
transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,
});
return web3_rpc_methods_1.personalRpcMethods.signTransaction(requestManager, formattedTx, passphrase);

@@ -53,0 +57,0 @@ });

@@ -29,21 +29,21 @@ /*

/**
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
export class Personal extends Web3Context {

@@ -176,3 +176,3 @@ /**

return __awaiter(this, void 0, void 0, function* () {
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase, this.config);
});

@@ -224,3 +224,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase, this.config);
});

@@ -227,0 +227,0 @@ }

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

});
export const sendTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT);
export const sendTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {
transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,
});
return personalRpcMethods.sendTransaction(requestManager, formattedTx, passphrase);
});
export const signTransaction = (requestManager, tx, passphrase) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT);
export const signTransaction = (requestManager, tx, passphrase, config) => __awaiter(void 0, void 0, void 0, function* () {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {
transactionSchema: config === null || config === void 0 ? void 0 : config.customTransactionSchema,
});
return personalRpcMethods.signTransaction(requestManager, formattedTx, passphrase);

@@ -44,0 +48,0 @@ });

import { Web3Context } from 'web3-core';
import { Address, EthPersonalAPI, HexString, Transaction } from 'web3-types';
/**
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
export declare class Personal extends Web3Context<EthPersonalAPI> {

@@ -24,0 +24,0 @@ /**

@@ -1,2 +0,2 @@

import { Web3RequestManager } from 'web3-core';
import { Web3RequestManager, Web3ConfigOptions } from 'web3-core';
import { Address, EthPersonalAPI, HexString, Transaction } from 'web3-types';

@@ -8,6 +8,6 @@ export declare const getAccounts: (requestManager: Web3RequestManager<EthPersonalAPI>) => Promise<string[]>;

export declare const importRawKey: (requestManager: Web3RequestManager<EthPersonalAPI>, keyData: HexString, passphrase: string) => Promise<string>;
export declare const sendTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string) => Promise<string>;
export declare const signTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string) => Promise<string>;
export declare const sendTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string, config?: Web3ConfigOptions) => Promise<string>;
export declare const signTransaction: (requestManager: Web3RequestManager<EthPersonalAPI>, tx: Transaction, passphrase: string, config?: Web3ConfigOptions) => Promise<string>;
export declare const sign: (requestManager: Web3RequestManager<EthPersonalAPI>, data: HexString, address: Address, passphrase: string) => Promise<string>;
export declare const ecRecover: (requestManager: Web3RequestManager<EthPersonalAPI>, signedData: HexString, signature: string) => Promise<string>;
//# sourceMappingURL=rpc_method_wrappers.d.ts.map
{
"name": "web3-eth-personal",
"version": "4.0.9-dev.fd2982d.0+fd2982d",
"version": "4.1.0",
"description": "Web3 module to interact with the Ethereum blockchain accounts stored in the node.",

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

"dependencies": {
"web3-core": "4.4.1-dev.fd2982d.0+fd2982d",
"web3-eth": "4.7.1-dev.fd2982d.0+fd2982d",
"web3-rpc-methods": "1.3.1-dev.fd2982d.0+fd2982d",
"web3-types": "1.6.1-dev.fd2982d.0+fd2982d",
"web3-utils": "4.3.1-dev.fd2982d.0+fd2982d",
"web3-validator": "2.0.7-dev.fd2982d.0+fd2982d"
"web3-core": "^4.6.0",
"web3-eth": "^4.9.0",
"web3-rpc-methods": "^1.3.0",
"web3-types": "^1.8.0",
"web3-utils": "^4.3.1",
"web3-validator": "^2.0.6"
},

@@ -66,5 +66,5 @@ "devDependencies": {

"typescript": "^4.7.4",
"web3-providers-ws": "4.0.8-dev.fd2982d.0+fd2982d"
"web3-providers-ws": "^4.0.8"
},
"gitHead": "fd2982d1afacd6bf89084324b478ec04af18052e"
"gitHead": "07993314c5db2dfaedb51bf1243c99568b6e070f"
}

@@ -24,21 +24,21 @@ /*

/**
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
* Eth Personal allows you to interact with the Ethereum node’s accounts.
* For using Eth Personal package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager.
* ```ts
*
*import { Web3 } from 'web3';
* const web3 = new Web3('http://127.0.0.1:7545');
*
* console.log(await web3.eth.personal.getAccounts());
*
* ```
* For using individual package install `web3-eth-personal` packages using: `npm i web3-eth-personal` or `yarn add web3-eth-personal`.
*
* ```ts
* import {Personal} from 'web3-eth-personal';
*
* const personal = new Personal('http://127.0.0.1:7545');
* console.log(await personal.getAccounts());
* ```
*/
export class Personal extends Web3Context<EthPersonalAPI> {

@@ -163,3 +163,3 @@ /**

public async sendTransaction(tx: Transaction, passphrase: string) {
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.sendTransaction(this.requestManager, tx, passphrase, this.config);
}

@@ -209,3 +209,3 @@ /**

public async signTransaction(tx: Transaction, passphrase: string) {
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase);
return rpcWrappers.signTransaction(this.requestManager, tx, passphrase, this.config);
}

@@ -212,0 +212,0 @@ /**

@@ -17,3 +17,3 @@ /*

*/
import { Web3RequestManager } from 'web3-core';
import { Web3RequestManager, Web3ConfigOptions } from 'web3-core';
import { toChecksumAddress, utf8ToHex } from 'web3-utils';

@@ -76,4 +76,7 @@ import { formatTransaction } from 'web3-eth';

passphrase: string,
config?: Web3ConfigOptions,
) => {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT);
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {
transactionSchema: config?.customTransactionSchema,
});

@@ -87,4 +90,7 @@ return personalRpcMethods.sendTransaction(requestManager, formattedTx, passphrase);

passphrase: string,
config?: Web3ConfigOptions,
) => {
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT);
const formattedTx = formatTransaction(tx, ETH_DATA_FORMAT, {
transactionSchema: config?.customTransactionSchema,
});

@@ -91,0 +97,0 @@ return personalRpcMethods.signTransaction(requestManager, formattedTx, passphrase);

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

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