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.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”Heap<A>
ElementCodec<A>
options?
Section titled “options?”Returns
Section titled “Returns”Uint8Array
Throws
Section titled “Throws”With FOREIGN_STRUCTURE,
MISSING_ELEMENT_CODEC, INVALID_CODEC_RESULT, NON_INJECTIVE_CODEC, or
SERIALIZATION_LIMIT_EXCEEDED when the input cannot be represented.