Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Merged
Changes from all 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
7 changes: 7 additions & 0 deletions lib/storacha.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import { ed25519 } from '@ucanto/principal'
import { CarReader } from '@ipld/car'
import { importDAG } from '@ucanto/core/delegation'

/**
* @param {string} data
*/
async function parseProof (data) {
// Casting to unsafe `any[]` to avoid the following TypeScript error:
// Argument of type 'Block[]' is not assignable to parameter
// of type 'Iterable<Block<unknown, number, number, 1>>'
/** @type {any[]} */
Comment on lines +6 to +13
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const blocks = []
const reader = await CarReader.fromBytes(Buffer.from(data, 'base64'))
for await (const block of reader.blocks()) {
Expand Down