import { Database, SqlValue } from 'sql.js'; export type GCliVaultData = ArrayLike | Uint8Array | null; export interface VaultAccount { address: string; name?: string; path?: string; parent?: string; crypto_scheme?: string; encrypted_suri?: Uint8Array; } export declare class GCliVault { private db; private sqlite; /** * Create a new database */ createDatabase(): Promise; /** * Get the database instance */ getDatabase(): Database; /** * Open connection to the SQLite database */ connect(data?: GCliVaultData): Promise; /** * Close database connection */ disconnect(): Promise; /** * Export database to a buffer */ export(): Promise | null>; /** * Get the database schema */ getSchema(): Promise<{ cid: SqlValue; name: SqlValue; type: SqlValue; notNull: boolean; defaultValue: SqlValue; primaryKey: boolean; }[]>; /** * Write database to disk */ /** * Get all vault accounts */ getAllAccounts(): Promise; /** * Get base accounts only (accounts without parent) */ getBaseAccounts(): Promise; /** * Get derivations for a specific account */ getDerivationsForAccount(parentAddress: string): Promise; /** * Get account by address */ getAccountByAddress(address: string): Promise; /** * Get account by name */ getAccountByName(name: string): Promise; /** * Get database statistics */ getStats(): Promise<{ total: number; base: number; derivations: number; }>; /** * Insert account into database */ insertAccount(account: VaultAccount): Promise; /** * Update account in database */ updateAccount(account: VaultAccount): Promise; /** * Parse database results into VaultAccount objects */ /** * Parse a single row into VaultAccount object */ private parseRow; } export declare function createVault(data?: GCliVaultData): Promise;