Để tạo tài khoản ethereum qua HTTP bạn có thể dùng câu lệnh này:
curl --location --request POST 'http://localhost:8545/'
--header 'Content-Type: application/json'
--data-raw '{
"jsonrpc":"2.0",
"method":"personal_newAccount",
"params":["password"],
"id":1
}'
tại đây.
Sau khi tạo tài khoản xong thì thông tin tài khoản sẽ nằm tại thư mục:
~/.ethereum
trên Linux
~/Library/Ethereum trên MacOS X
~/AppData/Roaming/Ethereum trên Windows
tại đâyNếu bạn không muốn dùng curl, bạn có thể sử dụng geth console:
- khởi động geth console, chạy lệnh: <code>geth attach http://127.0.0.1:8543</code>
- chạy lệnh tạo tài khoản trên geth console: <code>personal.newAccount('mật khẩu của bạn')</code>
- chạy lệnh unlock tài khoản (tuỳ chọn): <code>personal.unlockAccount('tài khoản vừa tạo', "mật khẩu")</code>