Thruput TypeScript protocol bindings
    Preparing search index...

    Writes compact XDR serialization (CXS) bytes.

    Implements

    Index

    Constructors

    • Create a writer with an optional initial buffer capacity.

      Parameters

      • capacity: number = INITIAL_CAPACITY

      Returns CxsWriter

    Methods

    • Return the written bytes without unused buffer capacity.

      Returns Uint8Array

    • Write a boolean as CXS int32 value 0 or 1.

      Parameters

      • val: boolean

      Returns void

    • Write fixed-length opaque bytes without padding.

      Parameters

      • val: Uint8Array
      • len: number

      Returns void

    • Write a signed 128-bit integer as high signed 64 bits followed by low unsigned 64 bits.

      Parameters

      • val: bigint

      Returns void

    • Write a signed 32-bit integer using CXS variable-length encoding.

      Parameters

      • val: bigint

      Returns void

    • Write a signed 64-bit integer using CXS variable-length encoding.

      Parameters

      • val: bigint

      Returns void

    • UTF-8 encode and write a length-prefixed string bounded by max bytes.

      Parameters

      • val: string
      • max: number

      Returns void

    • Write an unsigned 128-bit integer as two unsigned 64-bit words.

      Parameters

      • val: bigint

      Returns void

    • Write an unsigned 32-bit integer using CXS variable-length encoding.

      Parameters

      • val: bigint

      Returns void

    • Write an unsigned 64-bit integer using CXS variable-length encoding.

      Parameters

      • val: bigint

      Returns void

    • Write length-prefixed opaque bytes, bounded by max, without padding.

      Parameters

      • val: Uint8Array
      • max: number

      Returns void