Support CIDs as proofs
matheus23 opened this issue · 0 comments
matheus23 commented
The spec allows to use CIDs as proofs:
You can substitute [encoded proofs] for CIDs of the proofs as long as the proof is reachable over IPFS.
I'd like to support this without having to pull in a js-ipfs
dependency. Esp. because ipfs node setup is highly dependent on the use case. Plus, we don't want to force everyone using ts-ucan to run js-ipfs in their frontends.
So, instead I'd pull in multiformats
to be able to parse CIDs (we already have multibase in our dependencies anyway). On top of that, we can just require a function load: (cid: CID) => Promise<string>
and we should be fine.
As a second step we can think of providing ways to construct CID-backed UCAN chains.