How do I know the public key of the person I need to pay?

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?

rahs

Posted 2018-03-25T18:01:20.930

Reputation: 137

1

Second question answered here. In general, please do not ask multiple questions in a single post.

Nate Eldredge 2018-03-25T18:15:10.680

Answers

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?

dannypaz

Posted 2018-03-25T18:01:20.930

Reputation: 161

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?

Nate Eldredge

Posted 2018-03-25T18:01:20.930

Reputation: 21 420

0

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

Prayag k

Posted 2018-03-25T18:01:20.930

Reputation: 134