Closed roccomuso closed 5 years ago
There is only generate keyPair method since WAVES uses Curve25519-ED25519 signature with X25519 keys. You can read about it here. Could you please explain what are trying to achieve and why can't you just use seed? I will try to help you
I read that documentation. I'm trying to keep it atomic and avoid exposing a seed. It should be possible though to get public from private in X25519 or ed25519, isn't it? Feel free to reach me on wavesplatform discord.
Ok. So, first of all use [@waves/waves-crypto]() package. All new versions will be published there. In the latest version there are internal libraries exposed. You need 'axlsign', it has generateKeyPair method.
import {libs} from '@waves/waves-crypto'
const {axlsign} = libs
const keyPair = axlsign.generateKeyPair(privateKey:Uint8Array)
Here you can find its code. Although in code param is called 'seed', it is not seed but ed25519 key.
I saw that method but decided not to used it when I saw that "seed" param name. Trying it in a bit.
Yes, it is misleading. You pass ed25519 key and get X25519 keypair in return
Thanks! :+1:
How to do that? I saw there isn't a method exposed for that. Any hints using other npm modules?