3
votes
Accepted
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bytes × 4smartpy × 2
encoding × 2
serialization × 2
string × 2
pack × 2
smart-contracts × 1
michelson × 1
javascript × 1