@atcute/car
Version:
lightweight DASL CAR and atproto repository decoder for AT Protocol.
37 lines • 827 B
JavaScript
import * as CBOR from '@atcute/cbor';
import * as CID from '@atcute/cid';
import {} from '../car-reader/index.js';
export class RepoEntry {
collection;
rkey;
cid;
carEntry;
/** @internal */
constructor(
/** the collection this record belongs to */
collection,
/** record key */
rkey,
/** CID of this record */
cid,
/** the associated CarEntry for this record */
carEntry) {
this.collection = collection;
this.rkey = rkey;
this.cid = cid;
this.carEntry = carEntry;
}
/**
* raw contents of this record
*/
get bytes() {
return this.carEntry.bytes;
}
/**
* decoded contents of this record
*/
get record() {
return CBOR.decode(this.bytes);
}
}
//# sourceMappingURL=types.js.map