import { Output } from "../Models/Output"; /** * Defines a StorageEngine interface that can be implemented for specific use cases */ export interface ConfederacyStorageEngine { /** * Adds a new UTXO to the storage medium * @param utxo */ addUTXO(utxo: Output): Promise; /** * Gets a UTXO from the storage medium * @param txid * @param vout * @param topic */ findUTXO(txid: string, vout: number, topic?: string, spent?: boolean): Promise; /** * Gets a UTXO from the storage medium * @param {number} id - reference the unique data in the database */ findUTXOById(id: number): Promise; /** * Deletes a UTXO from the storage medium * @param txid * @param vout * @param topic */ deleteUTXO(txid: string, vout: number, topic: string): Promise; /** * Deletes a UTXO from the storage medium by id * @param id */ deleteUTXOById(id: number): Promise; /** * Updates a UTXO as spent * @param txid * @param vout * @param topic */ markUTXOAsSpent(txid: string, vout: number, topic: string): Promise; /** * Updates the consumedBy field * @param id * @param consumedBy */ updateConsumedBy(id: number, consumedBy: string): Promise; /** * Inserts record of the applied transaction * @param txid * @param topic */ insertAppliedTransaction(txid: string, topic: string): Promise; /** * Checks if a duplicate transaction exists * @param txid * @param topic */ findAppliedTransaction(txid: string, topic: string): Promise; } //# sourceMappingURL=ConfederacyStorageEngine.d.ts.map