import { Transaction } from './qrl_types.js'; import { HexString } from './primitives_types.js'; export type Cipher = 'aes-256-gcm'; export type CipherOptions = { salt?: Uint8Array | string; iv?: Uint8Array | string; kdf?: 'argon2id'; dklen?: number; t?: number; m?: number; p?: number; }; export type Argon2idParams = { dklen: number; t: number; m: number; p: number; salt: Uint8Array | string; }; export type KeyStore = { crypto: { cipher: Cipher; ciphertext: string; cipherparams: { iv: string; }; kdf: 'argon2id'; kdfparams: Argon2idParams; }; id: string; version: 1; address: string; }; export interface Web3BaseWalletAccount { [key: string]: unknown; readonly address: string; readonly seed: string; readonly signTransaction: (tx: Transaction) => Promise<{ readonly messageHash: HexString; readonly signature: HexString; readonly rawTransaction: HexString; readonly transactionHash: HexString; }>; readonly sign: (data: Record | string) => { readonly messageHash: HexString; readonly message?: string; readonly signature: HexString; }; readonly encrypt: (password: string, options?: Record) => Promise; } export interface Web3AccountProvider { seedToAccount: (seed: string) => T; create: () => T; decrypt: (keystore: KeyStore | string, password: string, options?: Record) => Promise; } export declare abstract class Web3BaseWallet extends Array { protected readonly _accountProvider: Web3AccountProvider; constructor(accountProvider: Web3AccountProvider); abstract create(numberOfAccounts: number): this; abstract add(account: T | string): this; abstract get(addressOrIndex: string | number): T | undefined; abstract remove(addressOrIndex: string | number): boolean; abstract clear(): this; abstract encrypt(password: string, options?: Record): Promise; abstract decrypt(encryptedWallet: KeyStore[], password: string, options?: Record): Promise; abstract save(password: string, keyName?: string, options?: Record): Promise; abstract load(password: string, keyName?: string): Promise; }