/go-fil-commp-hashhash

A hash.Hash implementation of fil-commitment-unsealed

Primary LanguageGoOtherNOASSERTION

go-fil-commp-hashhash

A hash.Hash implementation of fil-commitment-unsealed

GoDoc GoReport

Package commp allows calculating a Filecoin Unsealed Commitment (commP/commD) given a bytestream. It is implemented as a standard hash.Hash() interface, with the entire padding and treebuilding algorithm written in golang.

The returned digest is a 32-byte raw commitment payload. Use something like DataCommitmentV1ToCID in order to convert it to a proper cid.Cid.

The output of this library is 100% identical to ffi.GeneratePieceCIDFromFile()

Lead Maintainer

Peter 'ribasushi' Rabbitson

License

SPDX-License-Identifier: Apache-2.0 OR MIT