If you are trying to use any methods in the HiveJS client which require the use of a private key, you might have encountered one or both of these errors.
In my case, I was using the memo encode method which takes a private key as the first argument, unfortunately, pass it the wrong key and you’ll get a non-helpful AssertionError about an expected version.
You’re seeing the error because you’re providing the wrong key. If you get the error, “
AssertionError: Expected version 128, instead got 38” it means you are trying to use a public key when you need to use a private key.
In my instance, the error, “
AssertionError: Expected version 128, instead got 149” was because I was attempting to use my account password instead of my private memo key to encode the memo string.
These errors really need to be changed to be more helpful, right now they’re as cryptic as the functionality itself.