Skip to main content

Method Signature

Parameters

string
required
The private key to encrypt
string
required
Password for encryption (use a strong password!)

Returns

string
The wallet’s public address
string
The encrypted keystore JSON string

Examples

Complete Encryption/Decryption Flow

Encryption uses scrypt key derivation, which is deliberately slow (~3-5 seconds) to resist brute-force attacks.
Password Requirements: - Use a strong, unique password - Never store passwords alongside encrypted wallets - Consider using a key management service for production

From Encrypted

Decrypt a wallet

Create Wallet

Create new wallet