Skip to main content
The personal namespace methods manage private keys and should only be used on trusted nodes. Never use these methods over untrusted connections or expose them publicly.

Overview

The personal namespace provides methods for managing accounts, signing messages, and handling wallet operations.

Account Management

personal_newAccount

Creates a new account and returns its address.
string
required
Password to encrypt the account
string
The address of the newly created account
Example Response:

personal_listAccounts

Returns a list of addresses owned by the client.
array
Array of account addresses
Example Response:

personal_unlockAccount

Unlocks an account for a specified duration.
string
required
Address of the account to unlock
string
required
Password to decrypt the account
number
Duration in seconds to keep the account unlocked (default: 300)
boolean
true if the account was successfully unlocked
Unlocking accounts on production nodes is a security risk. Use signed transactions instead.

personal_lockAccount

Locks an account, removing the decrypted private key from memory.
string
required
Address of the account to lock
boolean
true if the account was successfully locked

Key Import

personal_importRawKey

Imports a private key and creates a new account.
string
required
Private key (hex encoded, 64 characters without 0x prefix)
string
required
Password to encrypt the account
string
Address of the imported account
Never share your private keys. Only import keys on secure, trusted nodes.

Wallet Operations

personal_listWallets

Returns a list of wallets managed by the node.
array
Array of wallet objects

personal_openWallet

Opens a hardware wallet.
string
required
Wallet URL (e.g., “ledger://”, “trezor://”)
string
Passphrase (optional, required for some hardware wallets)

personal_deriveAccount

Derives a new account from a hardware wallet.
string
required
Wallet URL
string
required
Derivation path (e.g., “m/44’/60’/0’/0/0”)
boolean
Whether to pin the derived account
object
Derived account information

Transaction Signing

personal_sendTransaction

Sends a transaction from an unlocked account.
object
required
Transaction object
string
required
Account password
string
Transaction hash

personal_signTransaction

Signs a transaction without sending it.
object
required
Transaction object (same structure as personal_sendTransaction)
string
required
Account password
object
Signed transaction

Message Signing

personal_sign

Signs arbitrary data with an account.
string
required
Data to sign (hex encoded)
string
required
Account address
string
required
Account password
string
65-byte signature (hex encoded)
Example Response:
The signature includes the prefix “\x19Ethereum Signed Message:\n” + message length before hashing, following EIP-191.

personal_ecRecover

Recovers the address that signed a message.
string
required
Original message (hex encoded)
string
required
Signature (65 bytes, hex encoded)
string
Address that signed the message

Usage Examples

JavaScript (Web3.js)

Python (Web3.py)


Security Best Practices

Critical Security Considerations
  1. Never expose personal namespace methods over public RPC endpoints
  2. Always use strong, unique passwords for accounts
  3. Never share private keys or passwords
  4. Use hardware wallets for production environments
  5. Prefer signing transactions offline and using eth_sendRawTransaction
Instead of using personal_sendTransaction, consider:

Account Storage

Accounts created with personal_newAccount are stored encrypted in the keystore directory:
Backup these files securely and never lose your password.