Open friedger opened 4 years ago
In Blockstack.js the the compressed key is returned as the public key while in stacks-transactions-js the uncompressed key is returned.
This results in two different addresses derived from the same private key using (semantically in my mind) the same derivation path:
publicKeyToString(getPublicKey(createStacksPrivateKey(userData.appPrivateKey)))
getPublicKeyFromPrivate(userData.appPrivateKey)
Should there be a method to derive the compressed public key from the uncompressed private key?
In Blockstack.js the the compressed key is returned as the public key while in stacks-transactions-js the uncompressed key is returned.
This results in two different addresses derived from the same private key using (semantically in my mind) the same derivation path:
publicKeyToString(getPublicKey(createStacksPrivateKey(userData.appPrivateKey)))
// via elliptic libgetPublicKeyFromPrivate(userData.appPrivateKey)
// from via bitcoin libShould there be a method to derive the compressed public key from the uncompressed private key?