import { MessageHash } from '#internal/node';
import { type KeyShareBackupInfo, type WaasWalletProperties } from '@dynamic-labs-wallet/core';
import type { ServerKeyShare } from './mpc/types.js';
export declare const createLogError: (clientTag: string) => ({ message, error, context }: {
    message: string;
    error: Error;
    context: Record<string, unknown>;
}) => void;
export declare const logError: ({ message, error, context, clientTag, }: {
    message: string;
    error: Error;
    context: Record<string, unknown>;
    clientTag?: string;
}) => void;
export declare const bytesToBase64: (arr: Uint8Array) => string;
export declare const stringToBytes: (str: string) => Uint8Array;
export declare const base64ToBytes: (base64: string) => Uint8Array;
export declare const ensureBase64Padding: (str: string) => string;
export declare const isHexString: (str: string) => boolean;
export declare const getExternalServerKeyShareBackupInfo: (params?: {
    walletProperties: WaasWalletProperties;
}) => KeyShareBackupInfo;
/**
 * Helper function to merge keyshares and remove duplicates based on pubkey and secretShare
 * @param existingKeyShares - Array of existing keyshares
 * @param newKeyShares - Array of new keyshares to merge
 * @returns Array of merged unique keyshares
 */
export declare const mergeUniqueKeyShares: (existingKeyShares: ServerKeyShare[], newKeyShares: ServerKeyShare[]) => ServerKeyShare[];
interface RetryConfig {
    maxAttempts?: number;
    retryInterval?: number;
    operationName?: string;
    logContext?: Record<string, unknown>;
}
/**
 * Generic helper function to retry a promise-based operations
 *
 * @param operation - The async operation to retry
 * @param config - Configuration options for retry behavior
 * @returns Promise with the operation result
 * @throws Last error encountered after all retries are exhausted
 */
export declare function retryPromise<T>(operation: () => Promise<T>, { maxAttempts, retryInterval, operationName, logContext }?: RetryConfig): Promise<T>;
export declare const formatEvmMessage: (message: string | Uint8Array) => MessageHash;
export declare const formatMessage: (chainName: string, message: string | Uint8Array) => string | Uint8Array | MessageHash;
export {};
//# sourceMappingURL=utils.d.ts.map