/// import bufio from 'bufio'; import { WorkerMessage } from './workerMessage'; import { WorkerTask } from './workerTask'; export interface DecryptNotesOptions { decryptForSpender: boolean; skipNoteValidation?: boolean; } export interface DecryptNotesAccountKey { incomingViewKey: Buffer; outgoingViewKey: Buffer; viewKey: Buffer; } export interface DecryptNotesItem { serializedNote: Buffer; currentNoteIndex: number | null; } export interface DecryptedNote { index: number | null; forSpender: boolean; hash: Buffer; nullifier: Buffer | null; serializedNote: Buffer; } export type DecryptNotesAccountKeys = DecryptNotesInlineAccountKeys | DecryptNotesSharedAccountKeys; export type ReadonlyDecryptNotesAccountKeys = ReadonlyDecryptNotesInlineAccountKeys | DecryptNotesSharedAccountKeys; export type DecryptNotesInlineAccountKeys = Array; export type ReadonlyDecryptNotesInlineAccountKeys = ReadonlyArray; export declare class DecryptNotesSharedAccountKeys { readonly length: number; readonly sharedBuffer: SharedArrayBuffer; constructor(accountKeys: ReadonlyArray | SharedArrayBuffer); at(index: number): DecryptNotesAccountKey | undefined; map(fn: (key: DecryptNotesAccountKey) => T): Array; private static serialize; } export declare class DecryptNotesRequest extends WorkerMessage { readonly accountKeys: ReadonlyDecryptNotesAccountKeys; readonly encryptedNotes: ReadonlyArray; readonly options: DecryptNotesOptions; constructor(accountKeys: ReadonlyDecryptNotesAccountKeys, encryptedNotes: ReadonlyArray, options: DecryptNotesOptions, jobId?: number); serializePayload(bw: bufio.StaticWriter | bufio.BufferWriter): void; getSharedMemoryPayload(): SharedArrayBuffer | null; static deserializePayload(jobId: number, buffer: Buffer, sharedAccountKeys: SharedArrayBuffer | null): DecryptNotesRequest; getSize(): number; } export declare class DecryptNotesResponse extends WorkerMessage { readonly notes: Array; constructor(notes: Array, jobId: number); serializePayload(bw: bufio.StaticWriter | bufio.BufferWriter): void; static deserializePayload(jobId: number, buffer: Buffer): DecryptNotesResponse; getSize(): number; /** * Groups each note in the response by the account it belongs to. The * `accounts` passed must be in the same order as the `accountKeys` in the * `DecryptNotesRequest` that generated this response. */ mapToAccounts(accounts: ReadonlyArray<{ accountId: string; }>): Map>; } export declare class DecryptNotesTask extends WorkerTask { private static instance; static getInstance(): DecryptNotesTask; execute({ accountKeys, encryptedNotes, options, jobId, }: DecryptNotesRequest): DecryptNotesResponse; } //# sourceMappingURL=decryptNotes.d.ts.map