Why does `sp.pack('some string')` prepend `0x05010000002e` before the actual bytes?
0x05 means "this is a packed Michelson value". 0x01 means "this is a string". The remaining 4 bytes represent the length of the string. A complete description of the binary format ...
Taquito has this functionality: the packData method in the RPC client package.
How do you submit a pair when calling an entrypoint on a contract with Taquito?
How do you convert a string sent to an entrypoint into its byte representation?
I struggled on this for a while but finally reached a solution. It's a bit hacky, but you just have to remove the 6 bytes that sp.pack prepends onto the bytes you actually want with sp.slice before ...
How are strings serialized in Tezos?
Strings are serialized as follows: 01 to indicate type string Four bytes (eight hex chars) to indicate length of string: 0000000c=0x0c=12 in your case The string represented by its ASCII values: ...
Only top scored, non community-wiki answers of a minimum length are eligible