Overview
Thepersonal 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
personal_listAccounts
Returns a list of addresses owned by the client.array
Array of account addresses
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
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
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)
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
Recommended Approach
Instead of usingpersonal_sendTransaction, consider:
Account Storage
Accounts created withpersonal_newAccount are stored encrypted in the keystore directory: