Support IPLD format multicodec `IpfsClient::dag_put` selection, or at least document the hardcoded defaullt.
nathan-at-least opened this issue · 1 comments
The docs for [IpfsClient::dag_put
aren't clear about which IPLD format multicodec is used.
For comparison, the js-ipfs
API docs for ipfs.dag.put
present an option for selecting the IPLD format.
Imagine a developer needs both a JS client and a rust ipfs_api
client to interoperate. To do this, at minimum the ipfs_api
needs to document which format is used, then the more flexible JS api would need to be modified to match. OTOH, if IpfsClient::dag_put
allowed selection of the format, then either implementation could change to interoperate with the other.
Just for everyone that might need this: the IPFS HTTP API docs specify that that inputted data will be parsed as JSON, and committed to the DAG as CBOR encoded data. This seems to be the case upon further testing and inspecting this repo's source code, but it would be good if this behavior was documented!