I put together a JS script for deriving HD wallet addresses.
Most of the code was copied from here, here, and here.
I wanted to have something that was more linear and easier to follow, just as a learning exercise to demonstrate how addresses are constructed in Cardano.
Hopefully this will be useful for anyone else who’s curious about how Cardano addresses work.
I originally wanted to do it in Python, but got stuck on deriving the child public key. Vacuumlabs seem to have made a custom library for this that they’re using in their adalite walllet, and this can be installed easily using npm.
hello,
Thank you very much for your code.
I got a question, you placed there a hand code first hd address generation:
derivationPath = [0x80000000, 0x80000000]
How do i generate the second one, third one…
Also, does cardano have change address? In that case, how do i generate the change address?
Thank you very much
I was never able to figure out how the derivation paths are generated, so I just left it hard coded as the first address.
I would say the best place to ask is probably the dev telegram group: https://t.me/CardanoDevelopersOfficial