···11import { Client } from "@atcute/client";
2233import * as CAR from "@atcute/car";
44+import { CarReader } from "@atcute/car/v4";
45import * as CBOR from "@atcute/cbor";
56import * as CID from "@atcute/cid";
67import { type FoundPublicKey, getPublicKeyFromDidController, verifySig } from "@atcute/crypto";
···105106 let commit: CAR.Commit;
106107107108 try {
108108- const reader = CAR.readCar(car);
109109+ const reader = CarReader.fromUint8Array(car);
109110 if (reader.header.data.roots.length !== 1) {
110111 errors.push({ message: `car must have exactly one root` });
111112 return { errors };
112113 }
113114114115 blockmap = new Map();
115115- for (const entry of reader.iterate()) {
116116+ for (const entry of reader) {
116117 const cidString = CID.toString(entry.cid);
117118118119 // Verify that `bytes` matches its associated CID