/// import { FileSystem } from '../../fileSystems'; import { NoteEncryptedHash } from '../../primitives/noteEncrypted'; import { Nullifier } from '../../primitives/nullifier'; import { Transaction, TransactionHash } from '../../primitives/transaction'; import { DatabaseKeyRange, DatabaseSchema, IDatabase, IDatabaseStore, IDatabaseTransaction } from '../../storage'; import { BloomFilter } from '../../utils/bloomFilter'; import { WorkerPool } from '../../workerPool'; import { Account } from '../account/account'; import { EncryptedAccount } from '../account/encryptedAccount'; import { MasterKey } from '../masterKey'; import { AccountValue } from './accountValue'; import { AssetValue } from './assetValue'; import { BalanceValue } from './balanceValue'; import { DecryptedNoteValue } from './decryptedNoteValue'; import { HeadValue } from './headValue'; import { MasterKeyValue } from './masterKeyValue'; import { AccountsDBMeta, MetaValue } from './metaValue'; import { MultisigIdentityValue } from './multisigIdentityValue'; import { ParticipantIdentity } from './participantIdentity'; import { TransactionValue } from './transactionValue'; export declare class WalletDB { db: IDatabase; workerPool: WorkerPool; location: string; files: FileSystem; accounts: IDatabaseStore<{ key: string; value: AccountValue; }>; meta: IDatabaseStore<{ key: keyof AccountsDBMeta; value: MetaValue; }>; heads: IDatabaseStore<{ key: Account['id']; value: HeadValue | null; }>; balances: IDatabaseStore<{ key: [Account['prefix'], Buffer]; value: BalanceValue; }>; decryptedNotes: IDatabaseStore<{ key: [Account['prefix'], NoteEncryptedHash]; value: DecryptedNoteValue; }>; nullifierToNoteHash: IDatabaseStore<{ key: [Account['prefix'], Nullifier]; value: Buffer; }>; sequenceToNoteHash: IDatabaseStore<{ key: [Account['prefix'], [number, Buffer]]; value: null; }>; nonChainNoteHashes: IDatabaseStore<{ key: [Account['prefix'], Buffer]; value: null; }>; transactions: IDatabaseStore<{ key: [Account['prefix'], TransactionHash]; value: TransactionValue; }>; sequenceToTransactionHash: IDatabaseStore<{ key: [Account['prefix'], [number, Buffer]]; value: null; }>; pendingTransactionHashes: IDatabaseStore<{ key: [Account['prefix'], [number, TransactionHash]]; value: null; }>; accountIdsToCleanup: IDatabaseStore<{ key: Account['id']; value: null; }>; timestampToTransactionHash: IDatabaseStore<{ key: [Account['prefix'], [number, TransactionHash]]; value: null; }>; assets: IDatabaseStore<{ key: [Account['prefix'], Buffer]; value: AssetValue; }>; nullifierToTransactionHash: IDatabaseStore<{ key: [Account['prefix'], Buffer]; value: TransactionHash; }>; unspentNoteHashes: IDatabaseStore<{ key: [Account['prefix'], Buffer, number, bigint, Buffer]; value: null; }>; valueToUnspentNoteHashes: IDatabaseStore<{ key: [Account['prefix'], Buffer, bigint, Buffer]; value: null; }>; multisigIdentities: IDatabaseStore<{ key: Buffer; value: MultisigIdentityValue; }>; participantIdentities: IDatabaseStore<{ key: [Account['prefix'], Buffer]; value: ParticipantIdentity; }>; masterKey: IDatabaseStore<{ key: 'key'; value: MasterKeyValue; }>; cacheStores: Array>; nullifierBloomFilter: BloomFilter | null; constructor({ files, location, workerPool, }: { files: FileSystem; location: string; workerPool: WorkerPool; }); open(): Promise; close(): Promise; setAccount(account: Account, tx?: IDatabaseTransaction): Promise; setEncryptedAccount(account: Account, masterKey: MasterKey, tx?: IDatabaseTransaction): Promise; removeAccount(account: Account, tx?: IDatabaseTransaction): Promise; setDefaultAccount(id: AccountsDBMeta['defaultAccountId'], tx?: IDatabaseTransaction): Promise; loadAccountsMeta(tx?: IDatabaseTransaction): Promise; loadMasterKey(tx?: IDatabaseTransaction): Promise; saveMasterKey(masterKey: MasterKey, tx?: IDatabaseTransaction): Promise; loadAccounts(tx?: IDatabaseTransaction): AsyncGenerator<[string, AccountValue], void, unknown>; getHead(account: Account, tx?: IDatabaseTransaction): Promise; saveHead(account: Account, head: HeadValue | null, tx?: IDatabaseTransaction): Promise; removeHead(account: Account, tx?: IDatabaseTransaction): Promise; loadHeads(tx?: IDatabaseTransaction): AsyncGenerator<{ accountId: string; head: HeadValue | null; }, void, unknown>; saveTransaction(account: Account, transactionHash: Buffer, transactionValue: TransactionValue, tx?: IDatabaseTransaction): Promise; deleteTransaction(account: Account, transactionHash: Buffer, tx?: IDatabaseTransaction): Promise; loadTransactions(account: Account, range?: DatabaseKeyRange, tx?: IDatabaseTransaction): AsyncGenerator; loadTransaction(account: Account, transactionHash: Buffer, tx?: IDatabaseTransaction): Promise; hasTransaction(account: Account, transactionHash: Buffer, tx?: IDatabaseTransaction): Promise; hasPendingTransaction(account: Account, transactionHash: Buffer, tx?: IDatabaseTransaction): Promise; disconnectNoteHashSequence(account: Account, noteHash: Buffer, sequence: number, tx?: IDatabaseTransaction): Promise; deleteNoteHashSequence(account: Account, noteHash: Buffer, sequence: number | null, tx?: IDatabaseTransaction): Promise; addUnspentNoteHash(account: Account, noteHash: Buffer, decryptedNote: DecryptedNoteValue, tx?: IDatabaseTransaction): Promise; deleteUnspentNoteHash(account: Account, noteHash: Buffer, decryptedNote: DecryptedNoteValue, tx?: IDatabaseTransaction): Promise; loadValueToUnspentNoteHashes(account: Account, assetId: Buffer, reverse?: boolean, start?: bigint, end?: bigint, tx?: IDatabaseTransaction): AsyncGenerator; loadUnspentNoteHashes(account: Account, assetId: Buffer, sequence?: number, tx?: IDatabaseTransaction): AsyncGenerator; loadUnspentNotes(account: Account, assetId: Buffer, sequence?: number, tx?: IDatabaseTransaction): AsyncGenerator; loadUnspentNoteValues(account: Account, assetId: Buffer, sequence?: number, tx?: IDatabaseTransaction): AsyncGenerator; private loadNullifierBloomFilter; loadNoteHash(account: Account, nullifier: Buffer, tx?: IDatabaseTransaction): Promise; saveNullifierNoteHash(account: Account, nullifier: Buffer, noteHash: Buffer, tx?: IDatabaseTransaction): Promise; deleteNullifier(account: Account, nullifier: Buffer, tx?: IDatabaseTransaction): Promise; saveDecryptedNote(account: Account, noteHash: Buffer, note: Readonly, tx?: IDatabaseTransaction): Promise; loadDecryptedNote(account: Account, noteHash: Buffer, tx?: IDatabaseTransaction): Promise; loadNoteHashesNotOnChain(account: Account, tx?: IDatabaseTransaction): AsyncGenerator; loadNotesNotOnChain(account: Account, tx?: IDatabaseTransaction): AsyncGenerator; loadNoteHashesInSequenceRange(account: Account, start: number, end: number, tx?: IDatabaseTransaction): AsyncGenerator; loadNotesInSequenceRange(account: Account, start: number, end: number, tx?: IDatabaseTransaction): AsyncGenerator; loadTransactionHashesInSequenceRange(account: Account, start: number, end: number, tx?: IDatabaseTransaction): AsyncGenerator; loadTransactionsInSequenceRange(account: Account, start: number, end: number, tx?: IDatabaseTransaction): AsyncGenerator; deleteDecryptedNote(account: Account, noteHash: Buffer, tx?: IDatabaseTransaction): Promise; loadDecryptedNotes(account: Account, range?: DatabaseKeyRange, tx?: IDatabaseTransaction): AsyncGenerator; getUnconfirmedBalance(account: Account, assetId: Buffer, tx?: IDatabaseTransaction): Promise; getUnconfirmedBalances(account: Account, tx?: IDatabaseTransaction): AsyncGenerator<{ assetId: Buffer; balance: BalanceValue; }>; saveUnconfirmedBalance(account: Account, assetId: Buffer, balance: BalanceValue, tx?: IDatabaseTransaction): Promise; loadExpiredTransactionHashes(account: Account, headSequence: number, tx?: IDatabaseTransaction): AsyncGenerator; loadExpiredTransactions(account: Account, headSequence: number, tx?: IDatabaseTransaction): AsyncGenerator; loadPendingTransactionHashes(account: Account, headSequence: number, tx?: IDatabaseTransaction): AsyncGenerator; loadPendingTransactions(account: Account, headSequence: number, tx?: IDatabaseTransaction): AsyncGenerator; deleteSequenceToTransactionHash(account: Account, sequence: number, transactionHash: Buffer, tx?: IDatabaseTransaction): Promise; savePendingTransactionHash(account: Account, expiration: number, transactionHash: TransactionHash, tx?: IDatabaseTransaction): Promise; deletePendingTransactionHash(account: Account, expiration: number, transactionHash: TransactionHash, tx?: IDatabaseTransaction): Promise; forceCleanupDeletedAccounts(signal?: AbortSignal): Promise; cleanupDeletedAccounts(recordsToCleanup: number, signal?: AbortSignal): Promise; encryptAccounts(passphrase: string, tx?: IDatabaseTransaction): Promise; decryptAccounts(passphrase: string, tx?: IDatabaseTransaction): Promise; accountsEncrypted(tx?: IDatabaseTransaction): Promise; loadTransactionsByTime(account: Account, tx?: IDatabaseTransaction, options?: { reverse?: boolean; }): AsyncGenerator; putAsset(account: Account, assetId: Buffer, assetValue: AssetValue, tx?: IDatabaseTransaction): Promise; getAsset(account: Account, assetId: Buffer, tx?: IDatabaseTransaction): Promise; loadAssets(account: Account, tx?: IDatabaseTransaction): AsyncGenerator; private nativeAssetValue; deleteAsset(account: Account, assetId: Buffer, tx?: IDatabaseTransaction): Promise; getTransactionHashFromNullifier(account: Account, nullifier: Buffer, tx?: IDatabaseTransaction): Promise; saveNullifierToTransactionHash(account: Account, nullifier: Buffer, transaction: Transaction, tx?: IDatabaseTransaction): Promise; deleteNullifierToTransactionHash(account: Account, nullifier: Buffer, tx?: IDatabaseTransaction): Promise; putMultisigIdentity(identity: Buffer, value: MultisigIdentityValue, tx?: IDatabaseTransaction): Promise; getMultisigIdentity(identity: Buffer, tx?: IDatabaseTransaction): Promise; deleteMultisigIdentity(identity: Buffer, tx?: IDatabaseTransaction): Promise; getMultisigIdentityByName(name: string, tx?: IDatabaseTransaction): Promise; getMultisigSecretByName(name: string, tx?: IDatabaseTransaction): Promise; hasMultisigSecretName(name: string, tx?: IDatabaseTransaction): Promise; getMultisigIdentities(tx?: IDatabaseTransaction): AsyncGenerator; } //# sourceMappingURL=walletdb.d.ts.map