import { BehaviorSubject } from 'rxjs'; import RadixAccountSystem from './RadixAccountSystem'; import RadixKeyPair from '../wallet/RadixKeyPair'; import RadixAtomUpdate from '../atom/RadixAtomUpdate'; import RadixDataAccountSystem from './RadixDataAccountSystem'; import RadixDecryptionProvider from '../identity/RadixDecryptionProvider'; import { RadixTransferAccountSystem, RadixMessagingAccountSystem, RadixDecryptionAccountSystem, RadixAtomCacheProvider, RadixCacheAccountSystem } from '../..'; export default class RadixAccount { readonly keyPair: RadixKeyPair; private nodeConnection; private accountSystems; private atomSubscription; connectionStatus: BehaviorSubject; cacheSystem: RadixCacheAccountSystem; decryptionSystem: RadixDecryptionAccountSystem; transferSystem: RadixTransferAccountSystem; dataSystem: RadixDataAccountSystem; messagingSystem: RadixMessagingAccountSystem; /** * Creates an instance of radix account. * @param keyPair Public key of the account * @param [plain] If set to false, will not create default account systems. * Use this for accounts that will not be connected to the network */ constructor(keyPair: RadixKeyPair, plain?: boolean); /** * Create an instance of radix account from an address * @param address string address * @param [plain] If set to false, will not create default account systems. * Use this for accounts that will not be connected to the network * @returns */ static fromAddress(address: string, plain?: boolean): RadixAccount; enableDecryption(decryptionProvider: RadixDecryptionProvider): void; enableCache(cacheProvider: RadixAtomCacheProvider): Promise; getAddress(): string; addAccountSystem(system: RadixAccountSystem): RadixAccountSystem; removeAccountSystem(name: string): void; getSystem(name: string): RadixAccountSystem; openNodeConnection: () => Promise; _onAtomReceived: (atomUpdate: RadixAtomUpdate) => Promise; private _onConnectionClosed; }