Function boolToByte

  • Converts a boolean to StaticArray.

    Parameters

    • val: bool

      the boolean value to convert

    Returns StaticArray<u8>

    the serialized boolean as a byte in a StaticArray 'byte array'

    Remarks

    The conversion is performed by creating a StaticArray of length 1, where the first byte represents the boolean value. If the value is true, the byte is set to 1, otherwise, it is set to 0.

Generated using TypeDoc