Author

Topic: bitcoin-cli getnewaddress Creates an address, but where is the private key? (Read 1689 times)

legendary
Activity: 1442
Merit: 1186
You can get the private key of the newly created address using the dumpprivkey command followed by the address.
Code:
bitcoin-cli dumpprivkey 1someBTCaddressxlkdFNndmf
https://bitcoin.org/en/developer-reference#dumpprivkey
staff
Activity: 3458
Merit: 6793
Just writing some code
It's in bitcoind's wallet. getnewaddress is an RPC call that works with the built-in wallet, and IIRC will be disabled if wallet functionality is disabled. To send the Bitcoin, there are various send* RPCs as well. Just do bitcoin-cli help to get info on what commands are available, and bitcoin-cli help will give you detailed help for whatever command you want.
sr. member
Activity: 338
Merit: 253
When I issue the following command:

Code:
bitcoin-cli getnewaddress

sure enough, an address is returned. But where is the private key? In order to transmit coins out of that address I will need a private key.
Jump to: