Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Outdated Functions in Monorepo README.md #215

Open
alextianyushi opened this issue Jan 9, 2025 · 1 comment
Open

Outdated Functions in Monorepo README.md #215

alextianyushi opened this issue Jan 9, 2025 · 1 comment
Assignees
Labels
auto-dag-data documentation Improvements or additions to documentation

Comments

@alextianyushi
Copy link

Hey, when I was testing the examples in the Monorepo README.md, the auto-dag-data functions (createFileIPLDDag and createFolderIPLDDag) seemed outdated. Could you update them to align with the auto-dag-data README.md?

Attached is what I tried for your information. Thanks for reviewing my issue!

import { processFileToIPLDFormat } from '@autonomys/auto-dag-data'
import { MemoryBlockstore } from 'blockstore-core/memory'
import fs from 'fs'

const fileStream = fs.createReadStream('./file.txt')
const fileSize = fs.statSync('./file.txt').size

const blockstore = new MemoryBlockstore()

;(async () => {
    const fileCID = await processFileToIPLDFormat(blockstore, fileStream, fileSize, 'file.txt')
    console.log(`File CID: ${fileCID}`)
  })()
@EmilFattakhov
Copy link
Member

Thank you for raising the issue @alextianyushi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-dag-data documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

4 participants