Open nathan-at-least opened 3 years ago
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!
The docs for [
IpfsClient::dag_put
aren't clear about which IPLD format multicodec is used.For comparison, the
js-ipfs
API docs foripfs.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 theipfs_api
needs to document which format is used, then the more flexible JS api would need to be modified to match. OTOH, ifIpfsClient::dag_put
allowed selection of the format, then either implementation could change to interoperate with the other.