oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
179 stars 24 forks source link

Add information about encoding/be explicit about encoding #269

Closed matheus23 closed 1 year ago

matheus23 commented 3 years ago

Summary

Don't handle encoding in webnative very well. What is the data you can put into webnative? Are they utf8-encoded strings? Arrays of numbers? Uint8Arrays? And what do we get when we take it back out?

We need to get more explicit about this. This will also help us fix inconsistencies between the public and private filesystem.

Problem

There are multiple problems:

Impact

Solution

We should provide an api just like node's fs.writeFile(path, data, { encoding: X }).

icidasset commented 1 year ago

Partially addressed in 0.35, only uses Uint8Arrays now.

icidasset commented 1 year ago

Implemented in #500 Part of #501