Skip to content

serializeHeap<A>(heap, codec, options?): Uint8Array

Defined in: packages/heap/src/serialization/binary.ts:141

Serialize a heap’s exact internal node order into canonical binary bytes. The caller-supplied order remains outside the artifact.

A

Heap<A>

ElementCodec<A>

SerializeHeapOptions

Uint8Array

With FOREIGN_STRUCTURE, MISSING_ELEMENT_CODEC, INVALID_CODEC_RESULT, NON_INJECTIVE_CODEC, or SERIALIZATION_LIMIT_EXCEEDED when the input cannot be represented.