Public
Edited
Sep 15, 2023
Insert cell
Insert cell
Insert cell
result = await web3.get(cid)
Insert cell
carData = streamToIterable(result.body.getReader())
Insert cell
decodedCar = await CarReader.fromBytes(carData)
Insert cell
moreDecodedCar = decodeCar(decodedCar)
Insert cell
applogs = moreDecodedCar.blocks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// import * as json from '@ipld/dag-json'
jsonMod = import("https://unpkg.com/@ipld/dag-json@10.1.4/dist/index.min.js")
Insert cell
json = globalThis.IpldDagJson // this IpldDagJson object is added to the globalThis via the import

Insert cell
ipldCar = import("https://unpkg.com/@ipld/car@5.2.3/dist/index.min.js")
// import { CarReader, CarWriter } from "@ipld/car"
Insert cell
CarReader = globalThis.IpldCar.CarReader
Insert cell
Web3Storage = import(
"https://unpkg.com/web3.storage@4.5.5/dist/bundle.esm.min.js"
)
Insert cell
web3 = new Web3Storage.Web3Storage({
token: "FAKE" /* import.meta.env.VITE_WEB3STORAGE_TOKEN */
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more