web3-eth-personal
Advanced tools
Comparing version 4.0.9-dev.4778a0c.0 to 4.0.9-dev.5080e80.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()); | ||
* ``` | ||
*/ | ||
export declare class Personal extends Web3Context<EthPersonalAPI> { | ||
@@ -64,2 +84,3 @@ /** | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -112,5 +133,5 @@ lockAccount(address: Address): Promise<boolean>; | ||
* **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure. | ||
* @param tx - The transaction data to sign. See {@link sendTransaction} for more information. | ||
* @param tx - The transaction data to sign. See sendTransaction for more information. | ||
* @param passphrase - The password of the `from` account, to sign the transaction with. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using {@link sendSignedTransaction}. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using sendSignedTransaction. | ||
* @example | ||
@@ -166,3 +187,3 @@ * ```ts | ||
* ```ts | ||
* const sig = await personal .sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* const sig = await personal.sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* console.log(sig) | ||
@@ -169,0 +190,0 @@ * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b |
@@ -54,2 +54,22 @@ "use strict"; | ||
const rpcWrappers = __importStar(require("./rpc_method_wrappers.js")); | ||
/** | ||
* 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 { | ||
@@ -128,2 +148,3 @@ /** | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -188,5 +209,5 @@ lockAccount(address) { | ||
* **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure. | ||
* @param tx - The transaction data to sign. See {@link sendTransaction} for more information. | ||
* @param tx - The transaction data to sign. See sendTransaction for more information. | ||
* @param passphrase - The password of the `from` account, to sign the transaction with. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using {@link sendSignedTransaction}. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using sendSignedTransaction. | ||
* @example | ||
@@ -246,3 +267,3 @@ * ```ts | ||
* ```ts | ||
* const sig = await personal .sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* const sig = await personal.sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* console.log(sig) | ||
@@ -249,0 +270,0 @@ * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b |
@@ -28,2 +28,22 @@ /* | ||
import * as rpcWrappers from './rpc_method_wrappers.js'; | ||
/** | ||
* 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 { | ||
@@ -102,2 +122,3 @@ /** | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -162,5 +183,5 @@ lockAccount(address) { | ||
* **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure. | ||
* @param tx - The transaction data to sign. See {@link sendTransaction} for more information. | ||
* @param tx - The transaction data to sign. See sendTransaction for more information. | ||
* @param passphrase - The password of the `from` account, to sign the transaction with. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using {@link sendSignedTransaction}. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using sendSignedTransaction. | ||
* @example | ||
@@ -220,3 +241,3 @@ * ```ts | ||
* ```ts | ||
* const sig = await personal .sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* const sig = await personal.sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* console.log(sig) | ||
@@ -223,0 +244,0 @@ * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b |
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()); | ||
* ``` | ||
*/ | ||
export declare class Personal extends Web3Context<EthPersonalAPI> { | ||
@@ -64,2 +84,3 @@ /** | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -112,5 +133,5 @@ lockAccount(address: Address): Promise<boolean>; | ||
* **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure. | ||
* @param tx - The transaction data to sign. See {@link sendTransaction} for more information. | ||
* @param tx - The transaction data to sign. See sendTransaction for more information. | ||
* @param passphrase - The password of the `from` account, to sign the transaction with. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using {@link sendSignedTransaction}. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using sendSignedTransaction. | ||
* @example | ||
@@ -166,3 +187,3 @@ * ```ts | ||
* ```ts | ||
* const sig = await personal .sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* const sig = await personal.sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* console.log(sig) | ||
@@ -169,0 +190,0 @@ * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b |
{ | ||
"name": "web3-eth-personal", | ||
"version": "4.0.9-dev.4778a0c.0+4778a0c", | ||
"version": "4.0.9-dev.5080e80.0+5080e80", | ||
"description": "Web3 module to interact with the Ethereum blockchain accounts stored in the node.", | ||
@@ -33,3 +33,3 @@ "main": "./lib/commonjs/index.js", | ||
"build:check": "node -e \"require('./lib')\"", | ||
"lint": "eslint --ext .js,.ts .", | ||
"lint": "eslint --cache --cache-strategy content --ext .ts .", | ||
"lint:fix": "eslint --fix --ext .js,.ts .", | ||
@@ -46,8 +46,8 @@ "format": "prettier --write '**/*'", | ||
"dependencies": { | ||
"web3-core": "4.3.2-dev.4778a0c.0+4778a0c", | ||
"web3-eth": "4.3.2-dev.4778a0c.0+4778a0c", | ||
"web3-rpc-methods": "1.1.4-dev.4778a0c.0+4778a0c", | ||
"web3-types": "1.3.2-dev.4778a0c.0+4778a0c", | ||
"web3-utils": "4.0.8-dev.4778a0c.0+4778a0c", | ||
"web3-validator": "2.0.4-dev.4778a0c.0+4778a0c" | ||
"web3-core": "4.5.1-dev.5080e80.0+5080e80", | ||
"web3-eth": "4.8.3-dev.5080e80.0+5080e80", | ||
"web3-rpc-methods": "1.3.1-dev.5080e80.0+5080e80", | ||
"web3-types": "1.7.1-dev.5080e80.0+5080e80", | ||
"web3-utils": "4.3.2-dev.5080e80.0+5080e80", | ||
"web3-validator": "2.0.7-dev.5080e80.0+5080e80" | ||
}, | ||
@@ -62,10 +62,10 @@ "devDependencies": { | ||
"eslint-plugin-import": "^2.26.0", | ||
"jest": "^28.1.3", | ||
"jest": "^29.7.0", | ||
"jest-extended": "^3.0.1", | ||
"prettier": "^2.7.1", | ||
"ts-jest": "^28.0.7", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.7.4", | ||
"web3-providers-ws": "4.0.8-dev.4778a0c.0+4778a0c" | ||
"web3-providers-ws": "4.0.9-dev.5080e80.0+5080e80" | ||
}, | ||
"gitHead": "4778a0ccf98fce3105f5e688f3fca10099a6e63d" | ||
"gitHead": "5080e80fe3e55494b2871e7906670807b086383b" | ||
} |
@@ -23,2 +23,22 @@ /* | ||
/** | ||
* 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> { | ||
@@ -93,2 +113,3 @@ /** | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -148,5 +169,5 @@ public async lockAccount(address: Address) { | ||
* **_NOTE:_** Sending your account password over an unsecured HTTP RPC connection is highly unsecure. | ||
* @param tx - The transaction data to sign. See {@link sendTransaction} for more information. | ||
* @param tx - The transaction data to sign. See sendTransaction for more information. | ||
* @param passphrase - The password of the `from` account, to sign the transaction with. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using {@link sendSignedTransaction}. | ||
* @returns - The RLP encoded transaction. The `raw` property can be used to send the transaction using sendSignedTransaction. | ||
* @example | ||
@@ -204,3 +225,3 @@ * ```ts | ||
* ```ts | ||
* const sig = await personal .sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* const sig = await personal.sign("Hello world", "0x0D4Aa485ECbC499c70860fEb7e5AaeAf5fd8172E", "123456") | ||
* console.log(sig) | ||
@@ -207,0 +228,0 @@ * > 0x5d21d01b3198ac34d0585a9d76c4d1c8123e5e06746c8962318a1c08ffb207596e6fce4a6f377b7c0fc98c5f646cd73438c80e8a1a95cbec55a84c2889dca0301b |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
88286
1600