helia
helia copied to clipboard
Compatibility with deno
For an ActivityPub project I need ipfs
in deno
and this seems most promising to me.
Currently it seems that the crypto.generateKeyPair is not supported, coming from
https://github.com/libp2p/js-libp2p-crypto
See https://stackoverflow.com/questions/72584422/how-to-convert-node-crypto-generatekeypairsync-to-deno
This is the error stack:
[AsyncFunction: createLibp2p] [Class: MemoryDatastore] [Class: MemoryBlockstore] [Function: unixfs] [Class: CID] [AsyncFunction: createHelia]
error: Uncaught Error: Not implemented: crypto.generateKeyPair
at notImplemented (ext:deno_node/_utils.ts:7:11)
at generateKeyPair (ext:deno_node/internal/crypto/keygen.ts:8:5)
at ext:deno_node/internal/util.mjs:83:15
at new Promise (<anonymous>)
at generateKeyPair (ext:deno_node/internal/util.mjs:68:12)
at Module.generateKey (file:///Users/ed/Library/Caches/deno/npm/registry.npmjs.org/@libp2p/crypto/1.0.14/dist/src/keys/ed25519.js:31:23)
at Module.generateKeyPair (file:///Users/ed/Library/Caches/deno/npm/registry.npmjs.org/@libp2p/crypto/1.0.14/dist/src/keys/ed25519-class.js:105:52)
at generateKeyPair (file:///Users/ed/Library/Caches/deno/npm/registry.npmjs.org/@libp2p/crypto/1.0.14/dist/src/keys/index.js:35:34)
at createEd25519PeerId (file:///Users/ed/Library/Caches/deno/npm/registry.npmjs.org/@libp2p/peer-id-factory/2.0.3/dist/src/index.js:6:23)
at createLibp2pNode (file:///Users/ed/Library/Caches/deno/npm/registry.npmjs.org/libp2p/0.43.3/dist/src/libp2p.js:395:32)