hashgraph / hedera-sdk-swift

Hedera™ SDK for Swift
Apache License 2.0
27 stars 11 forks source link

Missing Mnemonic.toEcdsaPrivateKey() function for "legacy" ECDSA private keys #390

Open krsticmilos96 opened 1 month ago

krsticmilos96 commented 1 month ago

Problem

If private key is created from mnemonic using Mnemonic.toEcdsaPrivateKey() we cannot use Mnemonic.toStandardECDSAsecp256k1PrivateKey()to retrieve that private key from memonics. Those two functions are having different algorithm and they are returning different values. Because of that we need to support both toEcdsaPrivateKey() and toStandardECDSAsecp256k1PrivateKey().

Solution

Implement toEcdsaPrivateKey() and toStandardECDSAsecp256k1PrivateKey()

Alternatives

No response