hldb / welo

peer-to-peer, collaborative states using Merkle-CRDTs
Other
32 stars 2 forks source link

Opal class makes ipfs.libp2p directly available #29

Closed tabcat closed 1 year ago

tabcat commented 1 year ago

The IPFS api type says ipfs.libp2p is undefined so will need to check for libp2p, throw if actually undefined, then directly expose libp2p from opal with the correct type.

tabcat commented 1 year ago

Looks like ipfs.libp2p is likely to be deprecated in the future. Should still be fine after but may require creating the libp2p node before and handing it to ipfs if ipfs stops exposing it.

https://github.com/ipfs/js-ipfs/blob/6be59068cc99c517526bfa123ad475ae05fcbaef/packages/ipfs-core/src/components/index.js#L201-L207