Closed kangarang closed 6 years ago
const obj = { id: "0xd0d6d6c5fe4a677d343cc433536bb717bae167dd", data: "This is a super token" } const CID = ipfs.addJSON(obj) const multihash = CID[0].hash registry.apply(keccak256(obj.id, numTokens, multihash)
const ipfsPath = await ipfs.files.get(multihash) let content ipfsPath.forEach(file => { console.log(file.path) content = JSON.parse(file.content.toString('utf8')) }) return content // { "id": "0xd0d6d6c5fe4a677d343cc433536bb717bae167dd", "data": "This is a super token" }
https://github.com/jfairbank/revalidate
e35f24d6e8b9cbd2e4379db6bc226bf775e32034
Build for Prospect Park edition, but be prepared to fail gracefully.
Add
Get
https://github.com/jfairbank/revalidate