0

As per the answer to this question, we cannot retrieve the public key of a user.

1)How does my wallet get the value (public key/public key hash) to which I need to make the payment?

2)What is the harm in exposing an address's public key?

  • 1
    Second question answered here. In general, please do not ask multiple questions in a single post. – Nate Eldredge Mar 25 '18 at 18:15
2

I read through both questions, so please correct me if im answering the wrong question.

  1. The user who you want to pay must send you their public key (or QR to scan) in order to send money to them. This is, of course, unless their public key (wallet) is listed on a public website. Please see https://en.bitcoin.it/wiki/Help:Introduction#Sending_payments

  2. In general*, there is no harm in exposing a public key. This question on crypto stackexchange goes into more detail Is exposing a public key bad?

1

That person has to tell you what their public key (or its hash) is. A Bitcoin address is the most convenient way to encode the hash of a public key, so typically the person will tell you an address and ask you to make a payment to that address. You can enter that address into your wallet and make the payment.

Related: How can a sender know receiver's public key when creating "Pay To Public Key" tx?

0

If you are using bitcoind, you can get new receivable address using bitcore-cli getnewaddress command

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.