Well, first of all, I am very new to Ethereum and maybe I am asking something stupid but my question is the following. I feel comfortable using json-rpc commands and I want to know how can I create a new Ethereum address. In bitcoind the method that I am searching for is "getnewaddress" but I don't know if there is another way to do it in Ethereum. If someone could help me I'd be grateful
1 Answer
have a look at the documentation :
Creating a new account
geth account new
Creates a new account and prints the address.
On the console, use:
personal.newAccount("passphrase")
Over RPC (insecure solution)
curl -X POST --data '{"jsonrpc":"2.0","method":"personal_newAccount","params":["passowrd"],"id":74}' http://localhost:8545
to use it you need to enable the personal Api geth --rpc --rpcapi "personal,eth,web3"
more details : https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_newaccount
-
Thanks for your reply, but I want create the address using json-rpc (I forgot to mention it, I edited the title now) Commented May 3, 2017 at 23:05
-
-
Okay, thank you! If you know, could you explain me the reason that method is insecure? Because I am working on a project where I will have a website and each user can generate new Ethereum address Commented May 4, 2017 at 9:42
-
I think you should open a new post to benefit from the others opinion.besides there is some others post discussing this issue ethereum.stackexchange.com/search?q=rpc+secure– Badr Bellaj ♦Commented May 4, 2017 at 10:15
-
when I perform this command get error "local keystore not used". Described more here ethereum.stackexchange.com/questions/102476/… Commented Jun 25, 2021 at 16:31