Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I decode an encoded attachment using RIDE functions?

The attachment is Base58 encoded, but the only Base58 decode method in ride requires the input to be string. How to convert bytevector to string? When an account script is processing a transaction does it see the attachment sent as Base58 encoded of the real attachment or the real attachment?

like image 653
Grozz Avatar asked Dec 07 '25 10:12

Grozz


1 Answers

RIDE doesn’t have a function that interprets byteVector as String, but only has functions toBase58String(byteVector) and toBase64String(byteVector) which decode a base58/64 encoded string to byteVector.

So in RIDE you can’t convert [72, 101, 108, 108, 111] to “Hello”, only to “9Ajdvzr” or to “base64:SGVsbG8=”. The attachment is handled as encoded base58/64.

like image 164
Nazim Faour Avatar answered Dec 11 '25 08:12

Nazim Faour



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!