SiaFoundation / siad

The Sia daemon
https://sia.tech
MIT License
130 stars 28 forks source link

How to get the private Key of address ? #138

Closed jaslin-W closed 2 years ago

jaslin-W commented 2 years ago

Hello teams. I want to get the private Key of address generate by sia-UI. I know it can export the primary private key. But how to get all private keys? Thank you.

lukechampine commented 2 years ago

To do this, you will need a Go program that converts your seed phrase to bytes, concatenates it with a seed index, and hashes the result. Can I ask why you want to do this?

jaslin-W commented 2 years ago

we are exchange. we want to manage the siacoin's deposit/withdrawal with ourselves code. so we want to migrate the address/privateKey from sia-ui to ourselves program. Thanks. I find the related code about generating address

jaslin-W commented 2 years ago

How to change the seed words to byte[32]?

jaslin-W commented 2 years ago

OK. I also find the related code. Thanks.