import { Account } from './Account'; import type { AccountId, AccountManagerOptions, Auth, ClientOptions, CreateAccountPayload, WalletEventType, GenerateAddressOptions, LedgerNanoStatus, NodeInfoWrapper, SyncOptions, WalletEvent } from '../types'; import { Event } from '../types'; /** The AccountManager class. */ export declare class AccountManager { private messageHandler; constructor(options: AccountManagerOptions); /** * Backup the data to a Stronghold snapshot. */ backup(destination: string, password: string): Promise; /** * Transform a bech32 encoded address to a hex encoded address */ bech32ToHex(bech32Address: string): Promise; /** * Change the Stronghold password. */ changeStrongholdPassword(currentPassword: string, newPassword: string): Promise; /** * Clear the Stronghold password from memory. */ clearStrongholdPassword(): Promise; /** * Create a new account. */ createAccount(payload: CreateAccountPayload): Promise; /** * Destroy the AccountManager and drop its database connection. */ destroy(): Promise; /** * Emit a provided event for testing of the event system. */ emitTestEvent(event: WalletEvent): Promise; /** * Generate a random BIP39 mnemonic. */ generateMnemonic(): Promise; /** * Get an account by its alias or index. */ getAccount(accountId: AccountId): Promise; /** * Get all account indexes. */ getAccountIndexes(): Promise; /** * Get all accounts. */ getAccounts(): Promise; /** * Generate an address without storing it. */ generateEd25519Address(accountIndex: number, addressIndex: number, options?: GenerateAddressOptions, bech32Hrp?: string): Promise; /** * Get the node info. */ getNodeInfo(url?: string, auth?: Auth): Promise; /** * Get the status for a Ledger Nano. */ getLedgerNanoStatus(): Promise; /** * Transform hex encoded address to bech32 encoded address. If no bech32Hrp * is provided, the AccountManager will attempt to retrieve it from the * NodeInfo. If this does not succeed, it will default to the Shimmer testnet bech32Hrp. */ hexToBech32(hex: string, bech32Hrp?: string): Promise; /** * Check if the Stronghold password has been set. */ isStrongholdPasswordAvailable(): Promise; /** * Listen to wallet events with a callback. An empty array will listen to all possible events. */ listen(eventTypes: WalletEventType[], callback: (error: Error, result: Event) => void): Promise; /** * Clear the callbacks for provided events. An empty array will clear all listeners. */ clearListeners(eventTypes: WalletEventType[]): Promise; /** * Find accounts with unspent outputs. */ recoverAccounts(accountStartIndex: number, accountGapLimit: number, addressGapLimit: number, syncOptions: SyncOptions): Promise; /** * Delete the latest account. */ removeLatestAccount(): Promise; /** * Restore a backup from a Stronghold file * Replaces client_options, coin_type, secret_manager and accounts. Returns an error if accounts were already created * If Stronghold is used as secret_manager, the existing Stronghold file will be overwritten. If a mnemonic was * stored, it will be gone. * if ignore_if_coin_type_mismatch is provided client options will not be restored * if ignore_if_coin_type_mismatch == true, client options coin type and accounts will not be restored if the cointype doesn't match * if ignore_if_bech32_hrp_mismatch == Some("rms"), but addresses have something different like "smr", no accounts * will be restored. */ restoreBackup(source: string, password: string, ignoreIfCoinTypeMismatch?: boolean, ignoreIfBech32Mismatch?: string): Promise; /** * Set ClientOptions. */ setClientOptions(clientOptions: ClientOptions): Promise; /** * Set the Stronghold password. */ setStrongholdPassword(password: string): Promise; /** * Set the interval after which the Stronghold password gets cleared from memory. */ setStrongholdPasswordClearInterval(intervalInMilliseconds?: number): Promise; /** * Start the background syncing process for all accounts. */ startBackgroundSync(options?: SyncOptions, intervalInMilliseconds?: number): Promise; /** * Stop the background syncing process for all accounts. */ stopBackgroundSync(): Promise; /** * Store a mnemonic in the Stronghold snapshot. */ storeMnemonic(mnemonic: string): Promise; /** * Verify if a mnemonic is a valid BIP39 mnemonic. */ verifyMnemonic(mnemonic: string): Promise; /** * Update the authentication for the provided node. */ updateNodeAuth(url: string, auth?: Auth): Promise; } //# sourceMappingURL=AccountManager.d.ts.map