import { BackupLocation, WalletOperation, type KeyShareBackupInfo, type ThresholdSignatureScheme, type WalletReadyState } from '@dynamic-labs-wallet/core';
import type { ClientKeyShare } from './mpc/types.js';
export interface WalletProperties {
    chainName: string;
    walletId: string;
    accountAddress: string;
    clientKeySharesBackupInfo: KeyShareBackupInfo;
    thresholdSignatureScheme: ThresholdSignatureScheme;
    derivationPath?: string;
    addressType?: string;
    walletReadyState: WalletReadyState;
}
export declare class WalletNotReadyError extends Error {
    readonly accountAddress: string;
    readonly walletReadyState: WalletReadyState;
    constructor(accountAddress: string, walletReadyState: WalletReadyState);
}
export type WalletBusyOperation = WalletOperation.REFRESH | WalletOperation.RESHARE;
/**
 * Operations that are queued in the heavy operation queue.
 * These operations are resource-intensive and mutually exclusive.
 */
export type HeavyQueueOperation = WalletOperation.REFRESH | WalletOperation.RESHARE | WalletOperation.RECOVER;
/**
 * Set of allowed heavy queue operations for runtime validation.
 */
export declare const HEAVY_QUEUE_OPERATIONS: Set<WalletOperation>;
/**
 * Type guard to validate that an operation is a valid heavy queue operation.
 */
export declare const isHeavyQueueOperation: (operation: WalletOperation) => operation is HeavyQueueOperation;
/**
 * Operations that are queued in the sign operation queue.
 * These operations are concurrent and read-only on key shares.
 */
export type SignQueueOperation = WalletOperation.SIGN_MESSAGE | WalletOperation.SIGN_TRANSACTION;
/**
 * Set of allowed sign queue operations for runtime validation.
 */
export declare const SIGN_QUEUE_OPERATIONS: Set<WalletOperation>;
/**
 * Type guard to validate that an operation is a valid sign queue operation.
 */
export declare const isSignQueueOperation: (operation: WalletOperation) => operation is SignQueueOperation;
/**
 * Operations that are queued as recovery operations.
 */
export type RecoverQueueOperation = WalletOperation.RECOVER;
/**
 * Set of allowed recover queue operations for runtime validation.
 */
export declare const RECOVER_QUEUE_OPERATIONS: Set<WalletOperation>;
/**
 * Type guard to validate that an operation is a valid recover queue operation.
 */
export declare const isRecoverQueueOperation: (operation: WalletOperation) => operation is RecoverQueueOperation;
export declare class WalletBusyError extends Error {
    readonly operation: WalletBusyOperation;
    readonly accountAddress: string;
    constructor(accountAddress: string, operation: WalletBusyOperation);
}
export type ShareDistribution = {
    clientShares: ClientKeyShare[];
    cloudProviderShares: Partial<Record<BackupLocation, ClientKeyShare[]>>;
    delegatedShare?: ClientKeyShare;
};
/**
 * Creates distribution where shares go to specified cloud providers
 * Last share goes to cloud providers, rest to Dynamic backend
 * @param providers - Array of cloud providers to backup to
 * @param allShares - All key shares to distribute
 */
export declare const createCloudProviderDistribution: ({ providers, allShares, }: {
    providers: BackupLocation[];
    allShares: ClientKeyShare[];
}) => ShareDistribution;
/**
 * Creates distribution with delegation + cloud backup
 * Client shares backed up to Dynamic AND cloud providers
 * Delegated share goes to webhook
 */
export declare const createDelegationWithCloudProviderDistribution: ({ providers, existingShares, delegatedShare, }: {
    providers: BackupLocation[];
    existingShares: ClientKeyShare[];
    delegatedShare: ClientKeyShare;
}) => ShareDistribution;
/**
 * Creates distribution for adding cloud backup to existing delegation
 * Client shares go to both Dynamic AND cloud providers
 * delegatedShare is undefined - we don't re-publish, but preserve the location
 */
export declare const createAddCloudProviderToExistingDelegationDistribution: ({ providers, clientShares, }: {
    providers: BackupLocation[];
    clientShares: ClientKeyShare[];
}) => ShareDistribution;
/**
 * Checks if wallet has backup on any of the specified providers
 */
export declare const hasCloudProviderBackup: (backupInfo: KeyShareBackupInfo | undefined, providers: BackupLocation[]) => boolean;
/**
 * Gets all cloud providers that have backups for this wallet
 */
export declare const getActiveCloudProviders: (backupInfo?: KeyShareBackupInfo) => BackupLocation[];
export declare const createDelegationOnlyDistribution: ({ existingShares, delegatedShare, }: {
    existingShares: ClientKeyShare[];
    delegatedShare: ClientKeyShare;
}) => ShareDistribution;
export declare const createDynamicOnlyDistribution: ({ allShares }: {
    allShares: ClientKeyShare[];
}) => ShareDistribution;
export declare const hasDelegatedBackup: (backupInfo?: KeyShareBackupInfo) => boolean;
export type Room = {
    roomId: string;
    createdAt: number;
    expiresAt: number;
};
export type InstrumentOptions = {
    extraArgs?: unknown[];
    /** Identifies which resource is being instrumented */
    key: string;
    /** Instrumentation does not use meta so this needs to be explicit */
    environmentId?: string;
    /** Measurement in MS the operation took to complete */
    time: number;
    appName?: string;
    userId?: string;
    primaryWalletId?: string;
};
//# sourceMappingURL=types.d.ts.map