import type { EncryptionMetadata } from '@dynamic-labs-wallet/core';
import type { DecryptionData, EncryptedData } from './types.js';
export declare const INVALID_PASSWORD_ERROR = "Decryption failed: Invalid password. Please check your password and try again.";
export declare class InvalidPasswordError extends Error {
    constructor();
}
export declare const KEY_SHARE_DECRYPTION_ERROR = "Decryption failed.";
/**
 * Diagnostic context attached to a KeyShareDecryptionError. Goes to log fields
 * so the monitor can group cross-env failures separately from KDF/version
 * mismatches without substring-matching on error messages.
 */
export type KeyShareDecryptionContext = {
    /** Populated when the envId-fallback was used (no user-supplied password). */
    environmentId?: string;
    kdfVersion: string;
};
/**
 * Decryption failure with no user-supplied password involved (distinct from
 * InvalidPasswordError, which is reserved for password-encrypted wallets).
 * The message is deliberately generic; `name`, `cause`, and `context` carry
 * the diagnostic.
 */
export declare class KeyShareDecryptionError extends Error {
    readonly context?: KeyShareDecryptionContext;
    constructor(options?: {
        cause?: unknown;
        context?: KeyShareDecryptionContext;
    });
}
/**
 * Encrypts data using the specified encryption version.
 * Always uses the latest encryption configuration for new encryptions by default.
 */
export declare const encryptData: ({ data, password, version, }: {
    data: string;
    password: string;
    version?: string;
}) => Promise<EncryptedData>;
/**
 * Decrypts data with version-based configuration.
 * Uses the version field from the data to determine encryption parameters.
 * Falls back to legacy version for backward compatibility if no version is specified.
 * For v3 (Argon2), retries with parallelism=1 if an OperationError occurs.
 */
export declare const decryptData: ({ data, password }: {
    data: DecryptionData;
    password: string;
}) => Promise<string>;
/**
 * Gets encryption metadata for a specific version.
 * Used when we need to include metadata in legacy systems or APIs that require it.
 */
export declare const getEncryptionMetadataForVersion: (version: string) => EncryptionMetadata;
//# sourceMappingURL=core.d.ts.map