/// /// import { AccountDiff } from '@metaplex-foundation/amman-client'; import { AccountInfo, Connection, Keypair } from '@solana/web3.js'; import * as Diff from 'diff'; import EventEmitter from 'events'; import { AmmanAccount } from '../types'; import { AccountProvider } from './providers'; export type { Change } from 'diff'; export declare type AccountState = { account: AmmanAccount | undefined; slot: number; data: Buffer; accountDiff?: AccountDiff; rendered?: string; renderedDiff?: Diff.Change[]; }; declare class AccountStateTracker { readonly states: (AccountState & { timestamp: number; })[]; add(state: AccountState): void; get relayStates(): { slot: number; accountDiff?: AccountDiff | undefined; rendered?: string | undefined; renderedDiff?: Diff.Change[] | undefined; timestamp: number; account: Record; }[]; renderDiff(lastState: AccountState | null, state: AccountState): Diff.Change[] | undefined; accountStateForSlot(slot: number): (AccountState & { timestamp: number; }) | undefined; accountDataForSlot(slot: number): Buffer | undefined; } export declare class AccountStates extends EventEmitter { readonly connection: Connection; readonly accountProvider: AccountProvider; readonly loadedAccountInfos: Map>; readonly loadedKeypairs: Map; readonly states: Map; readonly keypairs: Map; private _paused; get paused(): boolean; set paused(val: boolean); private constructor(); update(address: string, slot: number, accountInfo?: AccountInfo): Promise; add(address: string, state: AccountState): void; get(address: string): AccountStateTracker | undefined; accountStateForSlot(address: string, slot: number): (AccountState & { timestamp: number; }) | undefined; accountDataForSlot(address: string, slot: number): Buffer | undefined; allAccountAddresses(): string[]; storeKeypair(id: string, keypair: Keypair): void; labelKeypairs(labels: Record): void; get allKeypairs(): Map; getKeypairById(keypairId: string): Keypair | undefined; getKeypairByAddress(address: string): Keypair | undefined; private _onLog; private static _instance; static get instance(): AccountStates; static createInstance(connection: Connection, accountProvider: AccountProvider, loadedAccountInfos: Map>, loadedKeypairs: Map): AccountStates; } export declare function printableAccount(account: Record): Record;