• Struct is a fixed-size type: all fields in struct are fixed-size and it has a fixed quantity of fields. The size of a struct is the sum of all fields' size.

    Type Parameters

    • T extends Record<string, FixedBytesCodec>

    Parameters

    • shape: T

      a object contains all fields' codec

    • fields: (keyof T)[]

      the shape's keys. It provide an order for serialization/deserialization.

    Returns ObjectCodec<T> & Fixed

Generated using TypeDoc