hedera-sdk-java icon indicating copy to clipboard operation
hedera-sdk-java copied to clipboard

Deprecate `fromString` method in `PrivateKey`

Open rokn opened this issue 2 years ago • 2 comments

rokn avatar Dec 07 '23 10:12 rokn

For reference:

I reproduced same scenario in Java SDK of getting an error only when using an ECDSA HEX encoded private key. But would like to mention a couple of points to discuss them before opening relevant PR:

  • PrivateKey.fromString() has a lot of usages in examples and tests -- should they be updated along with deprecation? (Similar situation in Go SDK)
  • there is also a PrivateKey.fromBytes() method, which may give an error on some valid key -- should we consider its deprecation in SDKs as well?

Although deprecation of PrivateKey.fromString() is straightforward, would like to call this out to refresh our memory on a PrivateKey class and review consistency across all of the SDKs in it.

cc @agadzhalov

thenswan avatar May 29 '24 14:05 thenswan

Try to introduce a fix here.

thenswan avatar Aug 07 '24 07:08 thenswan