-
Notifications
You must be signed in to change notification settings - Fork 124
Make API more dev friendly #13
Comments
Hey @diasdavid could you clarify this a bit more? Is this how strings are described in API docs, or how we manage them in tests? Could you give an example? |
Today you have to write const myHash = 'Qm...'
object.get(myHash, {enc: 'base58'}) what we want is object.get(myHash) so that the default encoding for passing a string based multihash is |
Ah! Yes, that makes sense and would be really nice. Thanks @dignifiedquire :) |
@haadcode would you like to revisit your proposal? Now that CIDv1 is coming (ipfs/specs#130) |
What was proposed here still makes sense imo. I can look into making a PR later this week (I hope).
Can you elaborate how CID would change what is been requested here? Imo the .get() API should be clever and recognize between multihash, CID, multbase, multimulti and all other other formats :) |
Because the CID already carry the encoding format, the multibase, so saying:
|
DAG API is currently a WIP. Feedback is highly appreciated and now it is the best time to make sure if gets solidified with everyone's input, please add your comments and review there #99 |
@haadcode you had a proposal to make the default encoding of strings (in a multihash) to be base58 (and not multihash.toString), could you confirm and if possible, make a PR to update the tests with that?
The text was updated successfully, but these errors were encountered: