4

I want to create a single bitcoin address to which I can send and receive funds too. Using the bitcoin-core console, I typed in the following:

Input: getnewaddress

Output: Address: mhYC9ybAa2aHivEjYzyp7WcMXtpcmJvgV2


Input: validateaddress mhYC9ybAa2aHivEjYzyp7WcMXtpcmJvgV2

Output: Public Key: 02b33243d76c40e310a4214d8459f59d569f19f5804a26f0e1d70cf28d605411b3


Input: dumpprivkey mhYC9ybAa2aHivEjYzyp7WcMXtpcmJvgV2

Output: Private Key: cRYUqjikPgyVsWGfL26Q2i26vAAizgurajhW8mBZf2mRCM9NKf5W


Questions:

  1. Are those 3 values all I need to save to ensure I can easily send and receive funds?
  2. To receive funds, do I need to use the [Address] or the [Public Key] value?
  3. The [Public Key] seems to be a hex value, and the Private Key seems to be a hash value, is it possible to extract the hex value of the [Private Key] using bitcoin-core console?

Note:

  1. The above values were created on the testnet.
  2. I understand that technically I only need to save the [Private Key] and can generate the [Public Key] from the [Private Key]
  3. I understand that I will have to specify a change address so I don't lose any balance if I do not spend the total amount.
1
  1. If you are asking about the bare minimum thing to store to ensure that you can send and receive funds, then it will be the private key (which you already know). But to make transactions via the core, you only need to store the private key you get from the dumpprivkey api call and the address for receiving funds.

  2. To receive funds you have to use the address.

  3. I am unaware of any core API which would give the hex value from the private key you get from dumpprivkey. However, it is a really basic encryption scheme and you can decode it back to hex using any programming language.

This would be useful for a detailed explanation.

  • does dumpprivkey show the entire key? or some encoded ascii representation? – Sonic Soul Aug 29 '18 at 18:46
  • 1
    it dumps the key in the Wallet Import Format (WIF) – Shabahat M. Ayubi Aug 31 '18 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.