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

Closed
alextianyushi opened this issue Jan 9, 2025 · 2 comments
Closed

Outdated Functions in Monorepo README.md #215

alextianyushi opened this issue Jan 9, 2025 · 2 comments
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!

@clostao
Copy link
Member

clostao commented Jan 15, 2025

Many thanks for raising the issue @alextianyushi. Has been sorted at #217

@clostao clostao closed this as completed Jan 15, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Autonomys SDK / CLI Jan 15, 2025
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