ipfs/js-ipns

[Error] "callback is required" when using IPFS private key

npfoss opened this issue · 1 comments

js-ipfs version: 0.37.0.rc-0 (and master, as of 8/1/19)
js-ipns version: 0.6.0

const node = new IPFS()
// ... much later, after everything is set up ...
ipns.create(node._peerInfo.id._privKey, value, sequenceNumber, lifetime)

results in:

Error: record signature creation failed: callback is required

I investigated a bit and suspect this is happening because js-ipfs has not yet transitioned to the new async/await version of peer-id (0.13.x), which means the exported private key's sign function expects a callback, but js-inps expects a newer version with promises.

I've tried the simple solution of just incrementing the peer-id version in js-ipfs, and it built but could not successfully start the node (not sure why, there were no errors... it just hung).

Not sure where to go from here, let me know what I can do to help.

Closing this because the solution is to just use ipns@0.5.2 with js-ipfs for the time being.