Bitcoin Forum
May 04, 2024, 03:34:41 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 ♦♦♦
1714793681
Hero Member
*
Offline Offline

Posts: 1714793681

View Profile Personal Message (Offline)

Ignore
1714793681
Reply with quote  #2

1714793681
Report to moderator
1714793681
Hero Member
*
Offline Offline

Posts: 1714793681

View Profile Personal Message (Offline)

Ignore
1714793681
Reply with quote  #2

1714793681
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714793681
Hero Member
*
Offline Offline

Posts: 1714793681

View Profile Personal Message (Offline)

Ignore
1714793681
Reply with quote  #2

1714793681
Report to moderator
1714793681
Hero Member
*
Offline Offline

Posts: 1714793681

View Profile Personal Message (Offline)

Ignore
1714793681
Reply with quote  #2

1714793681
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6578


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!