/// <reference types="node" resolution-mode="require"/>
import { AliasHash } from '@polyaztec/barretenberg/account_id';
import { GrumpkinAddress } from '@polyaztec/barretenberg/address';
import { TxId } from '@polyaztec/barretenberg/tx_id';
import { CoreAccountTx, CoreDefiTx, CorePaymentTx } from '../core_tx/index.js';
import { Note } from '../note/index.js';
import { UserData } from '../user/index.js';
import { Alias, BulkUserStateUpdateData, Database, SpendingKey } from './database.js';
export declare class DexieDatabase implements Database {
    private dbName;
    private version;
    private dexie;
    private alias;
    private key;
    private mutex;
    private note;
    private spendingKey;
    private user;
    private userTx;
    private debug;
    constructor(dbName?: string, version?: number);
    open(): Promise<void>;
    close(): Promise<void>;
    clear(): Promise<void>;
    addNote(note: Note): Promise<void>;
    getNote(commitment: Buffer): Promise<Note | undefined>;
    getNoteByNullifier(nullifier: Buffer): Promise<Note | undefined>;
    nullifyNote(nullifier: Buffer): Promise<void>;
    getNotes(userId: GrumpkinAddress): Promise<Note[]>;
    getPendingNotes(userId: GrumpkinAddress): Promise<Note[]>;
    removeNote(nullifier: Buffer): Promise<void>;
    getUser(accountPublicKey: GrumpkinAddress): Promise<UserData | undefined>;
    getUsers(): Promise<UserData[]>;
    addUser(user: UserData): Promise<void>;
    updateUser(user: UserData): Promise<void>;
    removeUser(accountPublicKey: GrumpkinAddress): Promise<void>;
    resetUsers(): Promise<void>;
    upsertPaymentTx(tx: CorePaymentTx): Promise<void>;
    getPaymentTx(userId: GrumpkinAddress, txId: TxId): Promise<CorePaymentTx | undefined>;
    getPaymentTxs(userId: GrumpkinAddress): Promise<CorePaymentTx[]>;
    upsertAccountTx(tx: CoreAccountTx): Promise<void>;
    getAccountTx(txId: TxId): Promise<CoreAccountTx | undefined>;
    getAccountTxs(userId: GrumpkinAddress): Promise<CoreAccountTx[]>;
    upsertDefiTx(tx: CoreDefiTx): Promise<void>;
    getDefiTx(txId: TxId): Promise<CoreDefiTx | undefined>;
    getDefiTxs(userId: GrumpkinAddress): Promise<CoreDefiTx[]>;
    getUnclaimedDefiTxs(userId: GrumpkinAddress): Promise<CoreDefiTx[]>;
    getUserTxs(userId: GrumpkinAddress): Promise<(CoreAccountTx | CorePaymentTx | CoreDefiTx)[]>;
    isUserTxSettled(txId: TxId): Promise<boolean>;
    getPendingUserTxs(userId: GrumpkinAddress): Promise<(CoreAccountTx | CorePaymentTx | CoreDefiTx)[]>;
    removeUserTx(userId: GrumpkinAddress, txId: TxId): Promise<void>;
    addSpendingKey(spendingKey: SpendingKey): Promise<void>;
    addSpendingKeys(spendingKeys: SpendingKey[]): Promise<void>;
    getSpendingKey(userId: GrumpkinAddress, spendingKey: GrumpkinAddress): Promise<SpendingKey | undefined>;
    getSpendingKeys(userId: GrumpkinAddress): Promise<SpendingKey[]>;
    removeSpendingKeys(userId: GrumpkinAddress): Promise<void>;
    addAlias(alias: Alias): Promise<void>;
    addAliases(aliases: Alias[]): Promise<void>;
    getAlias(accountPublicKey: GrumpkinAddress): Promise<Alias | undefined>;
    getAliasByAliasHash(aliasHash: AliasHash): Promise<Alias>;
    addKey(name: string, value: Buffer, MAX_BYTE_LENGTH?: number): Promise<void>;
    getKey(name: string): Promise<Buffer | undefined>;
    deleteKey(name: string): Promise<void>;
    acquireLock(name: string, timeout: number): Promise<boolean>;
    extendLock(name: string, timeout: number): Promise<void>;
    releaseLock(name: string): Promise<void>;
    bulkUserStateUpdate(data: BulkUserStateUpdateData): Promise<void>;
    private createTables;
}
//# sourceMappingURL=dexie_database.d.ts.map