import type { ValueCodec } from "./value-codec"; /** * Parameters creating a MapCodec. */ export interface MapCodecParams { /** * Encode/decode functions for the map keys */ keyCodec: ValueCodec; /** * Encode/decode functions for the map values */ valueCodec: ValueCodec; } /** * A codec that combines two scalar codecs to encode and decode map keys and * values. * * @typeParam K - The type of the map keys. * @typeParam V - The type of the map values. */ export declare class MapCodec { private keyCodec; private valueCodec; /** * @param params - The codec parameters. */ constructor(params: MapCodecParams); /** * Take a typed key and encode it as a byte array. */ encodeKey(key: K): Uint8Array; /** * Take a typed value and encode it as a byte array. */ encodeValue(value: V): Uint8Array; /** * Take a byte array and decode it to a typed key. */ decodeKey(key: Uint8Array): K; /** * Take a byte array and decode it to a typed value. */ decodeValue(value: Uint8Array): V; }