rocklabs-io / ic-py

Python Agent Library for the DFINITY Internet Computer
MIT License
125 stars 25 forks source link

why is `0x` added to account ids? #73

Closed letmejustputthishere closed 1 year ago

letmejustputthishere commented 2 years ago

when i stringify an account identifier, 0x is added. i have to manually remove because appliations on the IC don't work with the 0x prefix. can it be removed by default and added only when explicitly stated?

Myse1f commented 2 years ago

You can use the method bytes to get the bytes format. Then use hex to get the string without 0x.

letmejustputthishere commented 2 years ago

yes, i can also remove the first two chars of the string ^^ but i'm wondering why you add it in the first place?