Bitcoin Forum
April 30, 2024, 08:50:29 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin-cli getnewaddress Creates an address, but where is the private key?  (Read 1725 times)
Blinken (OP)
Sr. Member
****
Offline Offline

Activity: 338
Merit: 253



View Profile
February 14, 2017, 05:34:38 AM
 #1

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.

Bitcoin ♦♦♦ Trust in Mathematics, Not Bankers ♦♦♦
1714467029
Hero Member
*
Offline Offline

Posts: 1714467029

View Profile Personal Message (Offline)

Ignore
1714467029
Reply with quote  #2

1714467029
Report to moderator
The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6565


Just writing some code


View Profile WWW
February 14, 2017, 05:59:41 AM
 #2

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 <command> will give you detailed help for whatever command you want.

coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
February 16, 2017, 01:38:55 AM
 #3

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

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!