@cere-ddc-sdk/ddc / MultipartPiece
The MultipartPiece
class represents a piece cobined from multiple parts (raw pieces).
Example
const parts = ['CID1', 'CID2'];
const multipartPiece = new MultipartPiece(parts, {
partSize: 1024,
totalSize: 2048,
});
console.log(MultipartPiece.isMultipartPiece(multipartPiece)); // true
▸ isMultipartPiece(object
): object is MultipartPiece
Checks if an object is an instance of MultipartPiece
.
Name | Type | Description |
---|---|---|
object |
unknown |
The object to check. |
object is MultipartPiece
true
if the object is an instance of MultipartPiece
or has the same properties as a MultipartPiece
, false
otherwise.
• Readonly
meta: MultipartPieceMeta
The metadata of the multipart piece.
• Readonly
partHashes: Uint8Array
[]
The hashes of the parts of the multipart piece.
• Readonly
parts: string
[]
The parts of the multipart piece.