Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: use CarBufferReader from @ipld/car #428

Merged
merged 4 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/access-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
"dist/src/**/*.d.ts.map"
],
"dependencies": {
"@ipld/car": "^5.0.3",
"@ipld/dag-cbor": "^9.0.0",
"@ipld/car": "^5.1.0",
"@ipld/dag-ucan": "^3.2.0",
"@ucanto/client": "^5.1.0",
"@ucanto/core": "^5.1.0",
Expand All @@ -80,7 +79,6 @@
"p-wait-for": "^5.0.0",
"type-fest": "^3.3.0",
"uint8arrays": "^4.0.3",
"varint": "^6.0.0",
"ws": "^8.12.0",
"zod": "^3.20.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/access-client/src/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @module
*/
/* eslint-disable unicorn/prefer-spread */
import { CarReader } from './utils/car-reader-sync.js'
import { CarBufferReader } from '@ipld/car/buffer-reader'
import * as CarBufferWriter from '@ipld/car/buffer-writer'
import { Delegation } from '@ucanto/core/delegation'
import * as u8 from 'uint8arrays'
Expand Down Expand Up @@ -72,7 +72,7 @@ export function bytesToDelegations(bytes) {
if (!(bytes instanceof Uint8Array) || bytes.length === 0) {
throw new TypeError('Input should be a non-empty Uint8Array.')
}
const reader = CarReader.fromBytes(bytes)
const reader = CarBufferReader.fromBytes(bytes)
const roots = reader.getRoots()

/** @type {Types.Delegation<T>[]} */
Expand Down
97 changes: 0 additions & 97 deletions packages/access-client/src/utils/car-header-validator.js

This file was deleted.

Loading