• Preparing search index...
  • The search index is not available
Solana JavaScript SDK
  • Solana JavaScript SDK
  • @solana/codecs-core
  • addDecoderSentinel

Function addDecoderSentinel

  • addDecoderSentinel<TTo>(
        decoder: FixedSizeDecoder<TTo>,
        sentinel: ReadonlyUint8Array,
    ): FixedSizeDecoder<TTo>
  • Creates a decoder that continues reading until a Uint8Array sentinel is found.

    If the sentinel is not found in the byte array to decode, an error is thrown.

    Type Parameters

    • TTo

    Parameters

    • decoder: FixedSizeDecoder<TTo>
    • sentinel: ReadonlyUint8Array

    Returns FixedSizeDecoder<TTo>

    • Defined in packages/codecs-core/src/add-codec-sentinel.ts:77
  • addDecoderSentinel<TTo>(
        decoder: Decoder<TTo>,
        sentinel: ReadonlyUint8Array,
    ): VariableSizeDecoder<TTo>
  • Creates a decoder that continues reading until a Uint8Array sentinel is found.

    If the sentinel is not found in the byte array to decode, an error is thrown.

    Type Parameters

    • TTo

    Parameters

    • decoder: Decoder<TTo>
    • sentinel: ReadonlyUint8Array

    Returns VariableSizeDecoder<TTo>

    • Defined in packages/codecs-core/src/add-codec-sentinel.ts:81

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc