eos-go: Got an error when trying to import PVT_K1 format private key

When I’m trying to import PVT_K1 format private key I got the error: “malformed private key”.

keyBag := &eos.KeyBag{}
err := keyBag.ImportPrivateKey(context.Background(), pk)

With old PK format works fine.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

I checked with eos-ecc library and indeed, the PVT_K1_ format is quite different than just removing the prefix.

The PUB_K1_ and EOS however is the exact same and I assume we actually simply ported the logic over to PVT_K1_ but it’s quite wrong.

I should be able to fix that.