Skip to content

How can I get the root hash for the bzz protocol? #13

@mattiaz9

Description

@mattiaz9

I can retrieve the root hash for the /bytes endpoint like this:

const data = new Uint8Array(fs.readFileSync("/some/file.txt"))
const chunkedFile = BmtJS.makeChunkedFile(data)
const rootChunk = chunkedFile.rootChunk()
const hash = Buffer.from(rootChunk.address()).toString("hex")

but if I wanted to upload that file to /bzz how can I get the correct hash?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions