Warm tip: This article is reproduced from serverfault.com, please click

Bitcoin how to create a new account via RPC

发布于 2020-12-03 08:52:55

I am running docker container with bitcoin node and want to create a new account, but I can't find good documentation about bitcoin RPC methods.

Questioner
JoshA
Viewed
11
Kohelbekker 2020-12-21 19:09:31

To create account using RPC run:

curl -H "Content-Type: application/json" --data '{"method": "getnewaddress"}' rpcuser:rpcpassword@ip:port 

Or, you can specify account and get this address assigned to new address:

curl -H "Content-Type: application/json" --data '{"method": "getnewaddress", "params": ["billy"]}' rpcuser:rpcpassword@ip:port

I've found it here - Bitcoin cryptocurrency node administration guide

Also, if you running docker container don't forget to publish container's port (like docker run -p "127.0.0.1:8332:8332")