Documentation
¶
Index ¶
- func GeneratePieceCIDFromFile(proofType abi.RegisteredSealProof, piece io.Reader, ...) (cid.Cid, error)
- func PieceAggregateCommP(proofType abi.RegisteredSealProof, pieceInfos []abi.PieceInfo) (cid.Cid, abi.PaddedPieceSize, error)
- func ZeroPadPieceCommitment(c cid.Cid, curSize abi.UnpaddedPieceSize, toSize abi.UnpaddedPieceSize) (cid.Cid, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePieceCIDFromFile ¶
func GeneratePieceCIDFromFile(proofType abi.RegisteredSealProof, piece io.Reader, pieceSize abi.UnpaddedPieceSize) (cid.Cid, error)
GeneratePieceCIDFromFile generates an a piece cid from an io.Reader
func PieceAggregateCommP ¶
func PieceAggregateCommP(proofType abi.RegisteredSealProof, pieceInfos []abi.PieceInfo) (cid.Cid, abi.PaddedPieceSize, error)
PieceAggregateCommP generates an aggregate CommP for a list of pieces that combine in size up to the sector size determined by the proofType parameter.
This function makes no assumptions, other than maximum size, about the pieces that you include. To create a correctly formed UnsealedCID (CommD) for a sector using this method, you should first ensure that the pieces add up to the required size.
func ZeroPadPieceCommitment ¶
func ZeroPadPieceCommitment(c cid.Cid, curSize abi.UnpaddedPieceSize, toSize abi.UnpaddedPieceSize) (cid.Cid, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.