How to derive Cardano addresses from public keys?

970 Views Asked by At

I've been searching for the way to derive cardano addresses from public keys since Daedalus added the ability to export my public key. I haven't found any resources saying how to do it programmatically. Can someone explain the steps needed to do so?

I'm aware of the derivation path but what would be the steps before and after that?

2

There are 2 best solutions below

0
On
0
On

You can use any programming language, providing JSON decoding, to derive Cardano addresses from public keys. It could be PHP, Java, Python, Swift, C#, Kotlin or any other language. You could use a cardano-cli utility the same way it was used for building the Daedalus. A derivation path for Shelley era wallet is the following:

m / 1852H / 1815H / 0H / 0 / 0

Read my answer if you need more details. In the end of it, there are links to medium story.