import type { Key, Value } from './common.js'; import type { AztecAsyncMap, AztecMap } from './map.js'; /** * A map backed by a persistent store that can have multiple values for a single key. */ export interface AztecMultiMap extends AztecMap { /** * Gets all the values at the given key. * @param key - The key to get the values from */ getValues(key: K): IterableIterator; /** * Deletes a specific value at the given key. * @param key - The key to delete the value at * @param val - The value to delete */ deleteValue(key: K, val: V): Promise; } /** * A map backed by a persistent store that can have multiple values for a single key. */ export interface AztecAsyncMultiMap extends AztecAsyncMap { /** * Gets all the values at the given key. * @param key - The key to get the values from */ getValuesAsync(key: K): AsyncIterableIterator; /** * Gets the number of values at the given key. * @param key - The key to get the number of values from * @returns The number of values at the given key */ getValueCountAsync(key: K): Promise; /** * Deletes a specific value at the given key. * @param key - The key to delete the value at * @param val - The value to delete */ deleteValue(key: K, val: V): Promise; }