0

Is there a trick to decoding the "0501..." strings used by SigningType.MICHELINE. I am trying to unpack it from python using:

from pytezos.michelson.types import MichelsonType

ty = MichelsonType.match({'prim': 'string'})
ty.unpack(bytes.fromhex('0501...')).to_python_object()

I always get an error that it is the wrong number of bytes though, any thoughts? Do I just need to pass the original length and manually unpack?

pytezos.michelson.micheline.MichelsonRuntimeError: not enough bytes to parse array body, wanted 3291190

There is some inconsistency in the docs here: https://tezostaquito.io/docs/signing#generating-a-signature-with-beacon-sdk

The first padding example is different from the full signing code. I think maybe the full example has the wrong padding for the standards?

2
  • 2
    Could you provide the entire string you have problems with (or any random string, just for example), so we can check it?
    – Groxan
    Mar 25, 2023 at 18:41
  • Will do asap when I get it from the person that has the problem.
    – user9011
    Mar 28, 2023 at 21:00

1 Answer 1

0

Ok the example in the docs was wrong and it is now corrected, that was the problem.

Correct example in signing docs:

enter image description here

https://github.com/ecadlabs/taquito/pull/2399/files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.