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

Function getOptionDecoder

  • getOptionDecoder<TTo, TSize extends number>(
        item: FixedSizeDecoder<TTo, TSize>,
        config: OptionCodecConfig<NumberDecoder> & {
            noneValue: "zeroes";
            prefix: null;
        },
    ): FixedSizeDecoder<Option<TTo>, TSize>
  • Creates a decoder for an optional value using the Option<T> type.

    Type Parameters

    • TTo
    • TSize extends number

    Parameters

    • item: FixedSizeDecoder<TTo, TSize>

      The decoder to use for the value that may be present.

    • config: OptionCodecConfig<NumberDecoder> & { noneValue: "zeroes"; prefix: null }

      A set of config for the decoder.

    Returns FixedSizeDecoder<Option<TTo>, TSize>

    • Defined in packages/options/dist/types/option-codec.d.ts:64
  • getOptionDecoder<TTo>(
        item: FixedSizeDecoder<TTo>,
        config: OptionCodecConfig<FixedSizeNumberDecoder> & { noneValue: "zeroes" },
    ): FixedSizeDecoder<Option<TTo>>
  • Creates a decoder for an optional value using the Option<T> type.

    Type Parameters

    • TTo

    Parameters

    • item: FixedSizeDecoder<TTo>

      The decoder to use for the value that may be present.

    • config: OptionCodecConfig<FixedSizeNumberDecoder> & { noneValue: "zeroes" }

      A set of config for the decoder.

    Returns FixedSizeDecoder<Option<TTo>>

    • Defined in packages/options/dist/types/option-codec.d.ts:68
  • getOptionDecoder<TTo>(
        item: FixedSizeDecoder<TTo>,
        config: OptionCodecConfig<NumberDecoder> & { noneValue: "zeroes" },
    ): VariableSizeDecoder<Option<TTo>>
  • Creates a decoder for an optional value using the Option<T> type.

    Type Parameters

    • TTo

    Parameters

    • item: FixedSizeDecoder<TTo>

      The decoder to use for the value that may be present.

    • config: OptionCodecConfig<NumberDecoder> & { noneValue: "zeroes" }

      A set of config for the decoder.

    Returns VariableSizeDecoder<Option<TTo>>

    • Defined in packages/options/dist/types/option-codec.d.ts:71
  • getOptionDecoder<TTo>(
        item: Decoder<TTo>,
        config?: OptionCodecConfig<NumberDecoder> & {
            noneValue?: ReadonlyUint8Array;
        },
    ): VariableSizeDecoder<Option<TTo>>
  • Creates a decoder for an optional value using the Option<T> type.

    Type Parameters

    • TTo

    Parameters

    • item: Decoder<TTo>

      The decoder to use for the value that may be present.

    • Optionalconfig: OptionCodecConfig<NumberDecoder> & { noneValue?: ReadonlyUint8Array }

      A set of config for the decoder.

    Returns VariableSizeDecoder<Option<TTo>>

    • Defined in packages/options/dist/types/option-codec.d.ts:74

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc