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

Function getMapDecoder

  • getMapDecoder<TToKey, TToValue>(
        key: Decoder<TToKey>,
        value: Decoder<TToValue>,
        config: MapCodecConfig<NumberDecoder> & { size: 0 },
    ): FixedSizeDecoder<Map<TToKey, TToValue>, 0>
  • Creates a decoder for a map.

    Type Parameters

    • TToKey
    • TToValue

    Parameters

    • key: Decoder<TToKey>

      The decoder to use for the map's keys.

    • value: Decoder<TToValue>

      The decoder to use for the map's values.

    • config: MapCodecConfig<NumberDecoder> & { size: 0 }

      A set of config for the decoder.

    Returns FixedSizeDecoder<Map<TToKey, TToValue>, 0>

    • Defined in packages/codecs-data-structures/dist/types/map.d.ts:33
  • getMapDecoder<TToKey, TToValue>(
        key: FixedSizeDecoder<TToKey>,
        value: FixedSizeDecoder<TToValue>,
        config: MapCodecConfig<NumberDecoder> & { size: number },
    ): FixedSizeDecoder<Map<TToKey, TToValue>>
  • Creates a decoder for a map.

    Type Parameters

    • TToKey
    • TToValue

    Parameters

    • key: FixedSizeDecoder<TToKey>

      The decoder to use for the map's keys.

    • value: FixedSizeDecoder<TToValue>

      The decoder to use for the map's values.

    • config: MapCodecConfig<NumberDecoder> & { size: number }

      A set of config for the decoder.

    Returns FixedSizeDecoder<Map<TToKey, TToValue>>

    • Defined in packages/codecs-data-structures/dist/types/map.d.ts:36
  • getMapDecoder<TToKey, TToValue>(
        key: Decoder<TToKey>,
        value: Decoder<TToValue>,
        config?: MapCodecConfig<NumberDecoder>,
    ): VariableSizeDecoder<Map<TToKey, TToValue>>
  • Creates a decoder for a map.

    Type Parameters

    • TToKey
    • TToValue

    Parameters

    • key: Decoder<TToKey>

      The decoder to use for the map's keys.

    • value: Decoder<TToValue>

      The decoder to use for the map's values.

    • Optionalconfig: MapCodecConfig<NumberDecoder>

      A set of config for the decoder.

    Returns VariableSizeDecoder<Map<TToKey, TToValue>>

    • Defined in packages/codecs-data-structures/dist/types/map.d.ts:39

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc