Interface: Chunk
Defined in: core-sdk/src/chunk/cac.ts:25
Content Addressed Chunk (CAC) - the immutable building block of Swarm, holding at most 4096 bytes of payload.
spanindicates the size of thepayloadin bytes.payloadcontains the actual data or the body of the chunk.datacontains the full chunk data -spanandpayload.addressis the Swarm hash (or reference) of the chunk.
The toSingleOwnerChunk method allows converting the CAC into a Single Owner Chunk (SOC).
Properties
address
address:
Reference
Defined in: core-sdk/src/chunk/cac.ts:29
data
readonlydata:Uint8Array
Defined in: core-sdk/src/chunk/cac.ts:26
payload
payload:
Bytes
Defined in: core-sdk/src/chunk/cac.ts:28
span
span:
Span
Defined in: core-sdk/src/chunk/cac.ts:27
toSingleOwnerChunk()
toSingleOwnerChunk: (
identifier,privateKey) =>SingleOwnerChunk
Defined in: core-sdk/src/chunk/cac.ts:34
Converts this CAC into a Single Owner Chunk (SOC), signed by privateKey
over identifier and this chunk's address.
Parameters
identifier
string | Uint8Array<ArrayBufferLike> | Identifier
privateKey
string | Uint8Array<ArrayBufferLike> | PrivateKey