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

Function getMapEncoder

  • getMapEncoder<TFromKey, TFromValue>(
        key: Encoder<TFromKey>,
        value: Encoder<TFromValue>,
        config: MapCodecConfig<NumberEncoder> & { size: 0 },
    ): FixedSizeEncoder<Map<TFromKey, TFromValue>, 0>
  • Creates a encoder for a map.

    Type Parameters

    • TFromKey
    • TFromValue

    Parameters

    • key: Encoder<TFromKey>

      The encoder to use for the map's keys.

    • value: Encoder<TFromValue>

      The encoder to use for the map's values.

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

      A set of config for the encoder.

    Returns FixedSizeEncoder<Map<TFromKey, TFromValue>, 0>

    • Defined in packages/codecs-data-structures/dist/types/map.d.ts:19
  • getMapEncoder<TFromKey, TFromValue>(
        key: FixedSizeEncoder<TFromKey>,
        value: FixedSizeEncoder<TFromValue>,
        config: MapCodecConfig<NumberEncoder> & { size: number },
    ): FixedSizeEncoder<Map<TFromKey, TFromValue>>
  • Creates a encoder for a map.

    Type Parameters

    • TFromKey
    • TFromValue

    Parameters

    • key: FixedSizeEncoder<TFromKey>

      The encoder to use for the map's keys.

    • value: FixedSizeEncoder<TFromValue>

      The encoder to use for the map's values.

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

      A set of config for the encoder.

    Returns FixedSizeEncoder<Map<TFromKey, TFromValue>>

    • Defined in packages/codecs-data-structures/dist/types/map.d.ts:22
  • getMapEncoder<TFromKey, TFromValue>(
        key: Encoder<TFromKey>,
        value: Encoder<TFromValue>,
        config?: MapCodecConfig<NumberEncoder>,
    ): VariableSizeEncoder<Map<TFromKey, TFromValue>>
  • Creates a encoder for a map.

    Type Parameters

    • TFromKey
    • TFromValue

    Parameters

    • key: Encoder<TFromKey>

      The encoder to use for the map's keys.

    • value: Encoder<TFromValue>

      The encoder to use for the map's values.

    • Optionalconfig: MapCodecConfig<NumberEncoder>

      A set of config for the encoder.

    Returns VariableSizeEncoder<Map<TFromKey, TFromValue>>

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

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc