import { DBInterface } from "./dbInterface"; import { FindexMasterKey } from "./master_keys"; /** * Findex class implementing callbacks using DbInterface and upsert and search functions * * @param db DB Interface, implementing the minimal DB requests for Findex algorithm */ export declare class Findex { private readonly _db; get db(): DBInterface; constructor(db: DBInterface); /** * This function is responsible of the Findex-indexes creation * * @param {FindexMasterKey} masterKeys containing K and K* * @param {Uint8Array} label used to create all indexes and to refresh them later on * @param locationAndWords correspondence between locations in database and words * @returns {void} does not return anything if everything went well */ upsert(masterKeys: FindexMasterKey, label: Uint8Array, locationAndWords: { [key: string]: string[]; }): Promise; /** * This function is the same as `upsert` but it will create letter-graphs for * words of more than 3 letters. For example, for "robert" : * * "rob" -> "robe" -> "rober" -> "robert" * * Searching for "rob" with a `graphRecursionLimit` greater or equal to * 3 will lead to the results associated to "robert". * * @param {FindexMasterKey} masterKeys containing K and K* * @param {Uint8Array} label used to create all indexes and to refresh them later on * @param locationAndWords correspondence between locations in database and words * @returns {void} does not return anything if everything went well */ graph_upsert(masterKeys: FindexMasterKey, label: Uint8Array, locationAndWords: { [key: string]: string[]; }): Promise; /** * * This function is used to search indexed words among Entry Table and Chain Table indexes * * @param {FindexMasterKey} masterKeys containing K and K* * @param key_search * @param {Uint8Array} label used to create all indexes and to refresh them later on * @param {string[]} words a list of words * @param {number} loopIterationLimit this number helps to limit the number of results in a search query when unchaining Index Table Entry item * @param graphRecursionLimit * @param progress * @returns {Uint8Array[]} a list of Indexed Values */ search(key_search: Uint8Array, label: Uint8Array, words: string[], loopIterationLimit: number, graphRecursionLimit: number, progress: Function): Promise; } //# sourceMappingURL=findex.d.ts.map