Skip to main content

PlainPacker.pack() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Pack returns packed message to transport envelope

Signature:

pack(payload: Uint8Array, _params: PlainPackerParams): Promise<Uint8Array>;

Parameters

ParameterTypeDescription
payloadUint8Arrayjson message serialized
_paramsPlainPackerParamsnot used here

Returns:

Promise<Uint8Array>

Promise<Uint8Array>