TBD54566975 / web5-kt

Apache License 2.0
10 stars 10 forks source link

Re-design Convert class and methods #270

Open jiyoontbd opened 6 months ago

jiyoontbd commented 6 months ago

Right now it's pretty easy to miss passing in EncodingFormat.XYZ into Convert constructor, and get the wrong output.

An alternative could be:

could scrap the constructor and provide these as static methods
Convert.Base64Url()
Convert.Zbase32()
Convert.Base58Btc()
Convert.String()
Convert.ByteArray()

when in turn return a convert instance that you can call toWhatever() on