import { IKeyPairBytes, ISignable, ISigner, TKeyType } from '../types'; import { Cypher } from './Cypher'; import Binary from '../Binary'; export default class Account implements ISigner { readonly cypher: Cypher; readonly address: string; readonly signKey: IKeyPairBytes; readonly encryptKey: IKeyPairBytes; readonly seed?: string | undefined; readonly networkId: string; readonly keyType: TKeyType; readonly nonce: number | Binary; parent?: Account; constructor(cypher: Cypher, address: string, signKey: IKeyPairBytes, encryptKey: IKeyPairBytes, seed?: string | undefined, nonce?: number | Uint8Array); /** * Get encrypted seed with a password */ encryptSeed(password: string): string; private signMessage; /** * Sign a message */ sign(message: string | Uint8Array): Binary; sign(subject: T): T; /** * Verify a signature with a message */ verify(message: string | Uint8Array, signature: Uint8Array): boolean; /** * Encrypt a message with the account's public key. * This message can only be decrypted with the account's private key. */ encrypt(message: string | Uint8Array): Binary; /** * Decrypt a message with the account's private key. * This message can only be encrypted with the account's public key. */ decrypt(message: Uint8Array): Binary; /** * Base58 encoded public sign key */ get publicKey(): string; /** * Base58 encoded private sign key */ get privateKey(): string; /** * Get LTO DID of account */ get did(): string; getAddressOnNetwork(network: string): string; }