• Preparing search index...
  • The search index is not available
Solana JavaScript SDK
  • Solana JavaScript SDK
  • @solana/web3.js
  • getNullableCodec

Function getNullableCodec

  • getNullableCodec<TFrom, TTo, TSize extends number>(
        item: FixedSizeCodec<TFrom, TTo, TSize>,
        config: NullableCodecConfig<NumberCodec> & {
            noneValue: "zeroes";
            prefix: null;
        },
    ): FixedSizeCodec<TFrom | null, TTo | null, TSize>
  • Creates a codec for an optional value using null as the None value.

    Type Parameters

    • TFrom
    • TTo
    • TSize extends number

    Parameters

    • item: FixedSizeCodec<TFrom, TTo, TSize>

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

    • config: NullableCodecConfig<NumberCodec> & { noneValue: "zeroes"; prefix: null }

      A set of config for the codec.

    Returns FixedSizeCodec<TFrom | null, TTo | null, TSize>

    • Defined in packages/codecs-data-structures/dist/types/nullable.d.ts:82
  • getNullableCodec<TFrom, TTo = TFrom>(
        item: FixedSizeCodec<TFrom, TTo>,
        config: NullableCodecConfig<FixedSizeNumberCodec> & { noneValue: "zeroes" },
    ): FixedSizeCodec<TFrom | null, TTo | null>
  • Creates a codec for an optional value using null as the None value.

    Type Parameters

    • TFrom
    • TTo = TFrom

    Parameters

    • item: FixedSizeCodec<TFrom, TTo>

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

    • config: NullableCodecConfig<FixedSizeNumberCodec> & { noneValue: "zeroes" }

      A set of config for the codec.

    Returns FixedSizeCodec<TFrom | null, TTo | null>

    • Defined in packages/codecs-data-structures/dist/types/nullable.d.ts:86
  • getNullableCodec<TFrom, TTo = TFrom>(
        item: FixedSizeCodec<TFrom, TTo>,
        config: NullableCodecConfig<NumberCodec> & { noneValue: "zeroes" },
    ): VariableSizeCodec<TFrom | null, TTo | null>
  • Creates a codec for an optional value using null as the None value.

    Type Parameters

    • TFrom
    • TTo = TFrom

    Parameters

    • item: FixedSizeCodec<TFrom, TTo>

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

    • config: NullableCodecConfig<NumberCodec> & { noneValue: "zeroes" }

      A set of config for the codec.

    Returns VariableSizeCodec<TFrom | null, TTo | null>

    • Defined in packages/codecs-data-structures/dist/types/nullable.d.ts:89
  • getNullableCodec<TFrom, TTo = TFrom>(
        item: Codec<TFrom, TTo>,
        config?: NullableCodecConfig<NumberCodec> & {
            noneValue?: ReadonlyUint8Array;
        },
    ): VariableSizeCodec<TFrom | null, TTo | null>
  • Creates a codec for an optional value using null as the None value.

    Type Parameters

    • TFrom
    • TTo = TFrom

    Parameters

    • item: Codec<TFrom, TTo>

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

    • Optionalconfig: NullableCodecConfig<NumberCodec> & { noneValue?: ReadonlyUint8Array }

      A set of config for the codec.

    Returns VariableSizeCodec<TFrom | null, TTo | null>

    • Defined in packages/codecs-data-structures/dist/types/nullable.d.ts:92

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc