diff --git a/src/pds.js b/src/pds.js index 9917da8..bff2f6a 100644 --- a/src/pds.js +++ b/src/pds.js @@ -982,25 +982,6 @@ export class PersonalDataServer { return blocks } - // Build CAR-style block bytes (without header, just block entries) - buildBlocksBytes(blocks) { - const parts = [] - for (const block of blocks) { - const cidBytes = block.cid instanceof Uint8Array ? block.cid : cidToBytes(block.cid) - const blockLen = cidBytes.length + block.data.length - // Varint encode the length - let len = blockLen - while (len >= 0x80) { - parts.push((len & 0x7f) | 0x80) - len >>= 7 - } - parts.push(len) - parts.push(...cidBytes) - parts.push(...block.data) - } - return new Uint8Array(parts) - } - async createRecord(collection, record, rkey = null) { const did = await this.getDid() if (!did) throw new Error('PDS not initialized')