See https://github.com/ChluNetwork/chlu-ipfs-support/pull/112/commits/2bd6d4c86f76f849dcd7b8efac3c32245ec3c5eb#diff-a8513da2877ad6ccd1d7f8af480d9b21R135
In short, ipfs.object.put(dagNode) where dagNode is an instance of DAGNode used to work fine. Now it throws an links is immutable error.
However, doing ipfs.object.put(dagNode.toJSON().data) works fine and looks like it produces the same result.
Something like:
async function createDAGNode(buf) {esolve, reject) => {
// DAGNode from ipld-dag-pb
DAGNode.create(buf, [], (err, dagNode) => {
if (err) reject(err); else resolve(dagNode);
});
});
}
const dagNode = await createDAGNode(Buffer.from('helloo'))
// this works
const multihash = await ipfs.object.put(dagNode.toJSON().data)
// this does not work, but the API Spec supports it and it worked in 0.28.2
const multihash2 = await ipfs.object.put(dagNode)
I would like to work in this issue 馃憤
could you help. @fazo96
@vmx can you also check this one?
Works on master, got fixed by https://github.com/ipfs/js-ipfs/commit/a82a5dcf7151fc900998578d0e03b3ab522fa244#diff-98e868a7effb24c7531c970fa7e3cd96R186.
Most helpful comment
I would like to work in this issue 馃憤
could you help. @fazo96