import { IKeyPair, IKeyPairBytes } from '../../interfaces'; import { EventChain } from './EventChain'; import { Event } from './Event'; import { HTTPSignature } from './HTTPSignature'; export declare class Account { /** * LTO Wallet Address */ address: string; /** * Seed phrase */ seed: string; /** * Signing keys */ sign: IKeyPairBytes; /** * Encryption keys */ encrypt: IKeyPairBytes; constructor(phrase?: string, networkByte?: string); /** * Create an event chain */ createEventChain(nonce?: string): EventChain; /** * Encrypt the seed phrase with a password */ encryptSeed(password: string, encryptionRounds?: number): string; /** * Get encoded seed phrase */ getEncodedPhrase(): string; /** * Add a signature to the event */ signEvent(event: Event): Event; /** * Add a signature to the http request */ signHTTPSignature(httpSign: HTTPSignature, algorithm?: string, encoding?: string): string; /** * Verify a signature with a message */ verify(signature: string, message: string | Uint8Array, encoding?: string): boolean; /** * Create a signature from a message */ signMessage(message: string, encoding?: string): string; /** * Encrypts a message for a particular recipient */ encryptFor(recipient: Account, message: string): Uint8Array; /** * Decrypts a message from a sender */ decryptFrom(sender: Account, message: Uint8Array): string; getSignKeys(encoding?: string): IKeyPair; getEncryptKeys(encoding?: string): IKeyPair; /** * Get public sign key in the given encoding */ getPublicSignKey(encoding?: string): string; /** * Set public sign key */ setPublicSignKey(publicKey: string, encoding?: string): void; /** * Get private sign key in the given encoding */ getPrivateSignKey(encoding?: string): string; /** * Get public encrypt key in the given encoding */ getPublicEncryptKey(encoding?: string): string; /** * Get public encrypt key in the given encoding */ getPrivateEncryptKey(encoding?: string): string; /** * Generate a random 24 byte nonce */ getNonce(): Uint8Array; }