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
495
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-personal

Web3 module to interact with the Ethereum blockchain accounts stored in the node.

  • 4.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
423K
decreased by-7.32%
Maintainers
4
Weekly downloads
 
Created

What is web3-eth-personal?

The web3-eth-personal package is a sub-package of the web3.js library that provides personal management functionalities for Ethereum accounts. It allows you to manage accounts, sign transactions, and interact with the Ethereum network on a personal level.

What are web3-eth-personal's main functionalities?

Create Account

This feature allows you to create a new Ethereum account with a specified password. The code sample demonstrates how to create a new account using the web3-eth-personal package.

const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545');

web3.eth.personal.newAccount('!@superpassword')
  .then(console.log);

Unlock Account

This feature allows you to unlock an Ethereum account for a specified duration. The code sample demonstrates how to unlock an account using the web3-eth-personal package.

const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545');

web3.eth.personal.unlockAccount('0x1234567890123456789012345678901234567890', 'password', 600)
  .then(console.log);

Sign Transaction

This feature allows you to sign a transaction with a specified account. The code sample demonstrates how to sign a transaction using the web3-eth-personal package.

const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545');

const tx = {
  from: '0x1234567890123456789012345678901234567890',
  to: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
  value: '1000000000000000000',
  gas: 2000000
};

web3.eth.personal.signTransaction(tx, 'password')
  .then(console.log);

Send Transaction

This feature allows you to send a transaction from a specified account. The code sample demonstrates how to send a transaction using the web3-eth-personal package.

const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545');

const tx = {
  from: '0x1234567890123456789012345678901234567890',
  to: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
  value: '1000000000000000000',
  gas: 2000000
};

web3.eth.personal.sendTransaction(tx, 'password')
  .then(console.log);

Other packages similar to web3-eth-personal

FAQs

Package last updated on 18 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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