Index
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| PieceCID | PieceCID - A constrained CID type for Piece Commitments. This is implemented as a Link type which is made concrete by a CID. A PieceCID uses the raw codec (0x55) and the fr32-sha256-trunc254-padbintree multihash function (0x1011) which encodes the base content length (as padding) of the original piece, and the height of the merkle tree used to hash it. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| calculate | Calculate the PieceCID (Piece Commitment) for a given data blob |
| getSize | Extract the raw (unpadded) size from a PieceCIDv2 |
| isPieceCID | Check if a CID is a valid PieceCID |
| parse | - |