7

How can I convert a bitcoin public key to a bitcoin address?

Note: I am using PHP.

Is there an existing bitcoin API or PHP-API to do that converting ?

Dennis Kriechel
  • 1,763
  • 4
  • 16
  • 34
Dev777
  • 301
  • 1
  • 4
  • 10

1 Answers1

8

There is a step-by-step tutorial on the Bitcoin Wiki for converting Keys.

For testing there is a very good website, where you can put in a private or public key and its show you the result of any step: http://gobittest.appspot.com/Address

If you dont want to do those things on your own you could use Bitcore, a JavaScript API for Bitcoin. For a pure PHP Libary there are some custom user projects on github, but I didn't tested any of them.

Dennis Kriechel
  • 1,763
  • 4
  • 16
  • 34
  • I can't figure out how to go from 0 to 1 in the step-by-step tutorial :( Looks like a programmatic solution might be here, but I'm thinking there must be an easier way http://bitcoin.stackexchange.com/questions/28398/how-can-i-get-the-uncompressed-public-key-from-the-compressed-public-key-in-open – Alex Millar Jan 24 '16 at 18:16