Skip to content

LegacyPieceCID

type LegacyPieceCID = LegacyPieceLink;

Defined in: packages/synapse-sdk/src/piece/piece.ts:42

LegacyPieceCID - A constrained CID type for Legacy Piece Commitments. This is implemented as a Link type which is made concrete by a CID. A LegacyPieceCID uses the fil-commitment-unsealed codec (0xf101) and the sha2-256-trunc254-padded (0x1012) multihash function. This 32 bytes of the hash digest in a LegacyPieceCID is the same as the equivalent PieceCID, but a LegacyPieceCID does not encode the length or tree height of the original raw piece. A PieceCID can be converted to a LegacyPieceCID, but not vice versa. LegacyPieceCID is commonly known as “CommP” or simply “Piece Commitment” in Filecoin.