Bitcoin Forum
April 23, 2024, 09:20:59 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 ♦♦♦
1713864059
Hero Member
*
Offline Offline

Posts: 1713864059

View Profile Personal Message (Offline)

Ignore
1713864059
Reply with quote  #2

1713864059
Report to moderator
Once a transaction has 6 confirmations, it is extremely unlikely that an attacker without at least 50% of the network's computation power would be able to reverse it.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713864059
Hero Member
*
Offline Offline

Posts: 1713864059

View Profile Personal Message (Offline)

Ignore
1713864059
Reply with quote  #2

1713864059
Report to moderator
1713864059
Hero Member
*
Offline Offline

Posts: 1713864059

View Profile Personal Message (Offline)

Ignore
1713864059
Reply with quote  #2

1713864059
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6530


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!