Zero-allocation binary writer for instruction data.

Little-endian, offset-tracking — the write-side counterpart of AccountReader from the decoders module.

1.1.0

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Write a signed 64-bit integer (little-endian).

    Parameters

    • val: bigint

    Returns this

    1.1.0

  • Write a 32-byte public key from base58 into the buffer.

    Note: For instruction data that embeds raw pubkeys (rare — most programs reference accounts via the keys array). Uses the SDK's built-in base58 decoder.

    Parameters

    • key: never

    Returns this

    1.1.0

  • Write raw bytes.

    Parameters

    • data: Uint8Array<ArrayBufferLike>

    Returns this

    1.1.0

  • Return the completed instruction data buffer.

    Returns Uint8Array<ArrayBufferLike>

    1.1.0

  • Write an unsigned 16-bit integer (little-endian).

    Parameters

    • val: number

    Returns this

    1.1.0

  • Write an unsigned 32-bit integer (little-endian).

    Parameters

    • val: number

    Returns this

    1.1.0

  • Write an unsigned 64-bit integer (little-endian).

    Parameters

    • val: bigint

    Returns this

    1.1.0

  • Write an unsigned 8-bit integer.

    Parameters

    • val: number

    Returns this

    1.1.0