type BeneficiaryTypeKey = 'HEIR' | 'SHAREHOLDER';
interface BeneficiaryTypeProps {
    id: BeneficiaryTypeKey;
}
interface BeneficiaryTypePrimitiveProps extends BeneficiaryTypeProps {
}
declare class BeneficiaryType {
    private props;
    constructor(props: BeneficiaryTypeProps);
    get id(): BeneficiaryTypeKey;
    get name(): "Heir" | "Shareholder" | "Unknown Name";
    get isHeir(): boolean;
    get isShareholder(): boolean;
    static fromPrimitives(props: BeneficiaryTypePrimitiveProps): BeneficiaryType;
    toPrimitives(): BeneficiaryTypePrimitiveProps;
}

interface BeneficiaryRelationProps {
    id: string;
}
interface BeneficiaryRelationPrimitiveProps extends BeneficiaryRelationProps {
}
declare class BeneficiaryRelation {
    private props;
    constructor(props: BeneficiaryRelationProps);
    get id(): string;
    get name(): "" | "Wife" | "Husband" | "Spouse" | "Child" | "Grandchild" | "Parent" | "Grandparent" | "Family member" | "Friend" | "Business Partner" | "Colleague" | "Lawyer" | "Notary" | "Trustee" | "Executor" | "Other";
    static fromPrimitives(props: BeneficiaryRelationPrimitiveProps): BeneficiaryRelation;
    toPrimitives(): BeneficiaryRelationPrimitiveProps;
}

interface BeneficiaryDeviceProps {
    id: string;
    code: string;
    beneficiaryId: string;
    type: string;
    plans: {
        id: string;
        name: string;
    }[];
}
interface BeneficiaryDevicePrimitiveProps extends Omit<BeneficiaryDeviceProps, 'id' | 'beneficiaryId'> {
    id: string;
    beneficiaryId: string;
}
declare class BeneficiaryDevice {
    private props;
    constructor(props: BeneficiaryDeviceProps);
    get id(): string;
    get code(): string;
    get type(): "SAFEKEY_PRO" | "SAFEKEY_MOBILE";
    get plans(): {
        id: string;
        name: string;
    }[];
    get name(): "SafeKey Pro" | "SafeKey Mobile";
    static fromPrimitives(props: BeneficiaryDevicePrimitiveProps): BeneficiaryDevice;
    toPrimitives(): BeneficiaryDevicePrimitiveProps;
}

interface BeneficiaryProps {
    id: string;
    firstName: string;
    lastName?: string;
    email?: string;
    code?: string;
    relation?: BeneficiaryRelation;
    profilePictureUrl?: string;
    types: BeneficiaryType[];
    summary?: {
        backup: number;
        inheritance: number;
        planShares: number;
        storageDevices: number;
        mergeAuthority: number;
    };
    devices: BeneficiaryDevice[];
}
interface BeneficiaryPrimitiveProps extends Omit<BeneficiaryProps, 'types' | 'relation' | 'devices'> {
    types: BeneficiaryTypePrimitiveProps[];
    relation?: BeneficiaryRelationPrimitiveProps;
    devices: BeneficiaryDevicePrimitiveProps[];
}
declare class Beneficiary {
    private props;
    constructor(props: BeneficiaryProps);
    get id(): string;
    get code(): string | undefined;
    get devices(): BeneficiaryDevice[];
    get fullName(): string | undefined;
    get firstName(): string;
    get lastName(): string | undefined;
    get description(): "" | "Wife" | "Husband" | "Spouse" | "Child" | "Grandchild" | "Parent" | "Grandparent" | "Family member" | "Friend" | "Business Partner" | "Colleague" | "Lawyer" | "Notary" | "Trustee" | "Executor" | "Other" | undefined;
    get hasConnection(): boolean;
    get profilePictureUrl(): string | undefined;
    get email(): string | undefined;
    get types(): BeneficiaryType[];
    get typeNames(): string;
    get protectionPlansCount(): number;
    get involvement(): {
        backup: number;
        inheritance: number;
        planShares: number;
        storageDevices: number;
        mergeAuthority: number;
    } | undefined;
    static fromPrimitives(props: BeneficiaryPrimitiveProps): Beneficiary;
    update(props: Partial<BeneficiaryProps>): void;
    includesType(type: string): boolean;
    toPrimitives(): BeneficiaryPrimitiveProps;
}

type AppProviderServices = Record<string, InstanceType<any>>;
interface AppProvider {
    get type(): "service" | "data" | "utils";
    services(params?: any): AppProviderServices;
}

declare abstract class AppModule {
    abstract name: string;
    abstract providers: AppProvider[];
    protected serviceRegistry: Record<string, any>;
    protected config: Record<string, any>;
    constructor(args: {
        deps: Record<string, AppModule>;
        config?: Record<string, any>;
    });
    init(): void;
    getService<T>(name: string): T;
    getConfig<T = any>(path?: string, throwIfMissing?: boolean): T | undefined;
}

declare class HttpError extends Error {
    status: string;
    details: any;
    constructor(message: string, status?: string, details?: any);
}

interface ApiResponse<T = any> {
    status: number;
    headers: Headers;
    body: T;
    rawBody: any;
    json: any;
}
interface ApiClient {
    key?: string;
}
interface ErrorHandlingStrategy {
    handleNetworkError?: (error: HttpError) => void;
    handleUnauthorizedError?: (error: HttpError) => void;
    handleForbiddenError?: (error: HttpError) => void;
    handleInvalidClientError?: (error: HttpError) => void;
    handleGenericError?: (error: HttpError, status: number) => void;
    shouldShowToast?: (error: HttpError, status: number) => boolean;
    getErrorTitle?: () => string;
}
interface Options extends RequestInit {
    client?: ApiClient;
    skipErrorToast?: boolean;
    errorHandling?: ErrorHandlingStrategy;
    skipCsrf?: boolean;
}

interface HttpClientConfig {
    apiUrl: string;
    errorHandlingStrategy?: ErrorHandlingStrategy;
    client?: ApiClient;
}
declare class HttpClient {
    private config;
    private csrfToken;
    private csrfTokenPromise;
    constructor(config: HttpClientConfig);
    get apiUrl(): string;
    setApiUrl(url: string): void;
    get client(): ApiClient | undefined;
    get errorHandlingStrategy(): ErrorHandlingStrategy;
    static isValidObject(value: any): boolean;
    static flattenObject(value: any, path?: any[]): any;
    static jsonToQueryString(json: Record<string, any>): string;
    fetchJson<T = any>(url: string, options?: Options): Promise<ApiResponse<T>>;
    fetchData(url: string, options?: Options): Promise<Response>;
    private createHeaders;
    private interceptResponse;
    private isUnauthorized;
    private isLimitExceeded;
    private getMethod;
    private isBrowserRuntime;
    private shouldAttachCsrf;
    private fetchCsrfToken;
    private getOrCreateCsrfToken;
    private attachCsrfHeaderIfNeeded;
}

type CoreModuleConfig = {
    httpClient: HttpClient;
    secureStorage?: {
        getKey: (params?: any) => Promise<string>;
    };
    safekey?: {
        enableMergeAuthorityAuthCheck?: boolean;
    };
};

declare class ProtectionPlanDataProvider implements AppProvider {
    private core;
    private module;
    constructor(core: AppModule, module: ProtectionPlanModule);
    get type(): string;
    services(params?: any): Record<string, InstanceType<any>>;
}

declare class ProtectionPlanServiceProvider implements AppProvider {
    private core;
    private module;
    private socketListener;
    constructor(core: AppModule, module: ProtectionPlanModule);
    get type(): string;
    services(params?: any): Record<string, InstanceType<any>>;
}

declare class PlanListingAndCreationUseCaseProvider implements AppProvider {
    private module;
    constructor(module: ProtectionPlanModule);
    get type(): "service";
    services(): Record<string, any>;
}

interface QueryOptions {
    keepPreviousData?: boolean;
    enabled?: boolean;
    cacheTime?: number;
    staleTime?: number;
}

declare class PlanConfigurationUseCaseProvider implements AppProvider {
    private module;
    private safekeyModule;
    constructor(module: ProtectionPlanModule, safekeyModule: AppModule);
    get type(): "service";
    services(): Record<string, any>;
}

declare class PlanMergingUseCaseProvider implements AppProvider {
    private module;
    private safekeyModule;
    constructor(module: ProtectionPlanModule, safekeyModule: AppModule);
    get type(): "service";
    services(): Record<string, any>;
}

/**
 * Union of all supported secret types that can be stored in a data asset.
 */
type SecretData = PlainTextAsset | UserAndPasswordAsset | RecoveryCodeAsset | PINCodeAsset | ApiKeyAsset | PrivateKeyAsset | SeedPhraseAsset | PaymentDebitCardAsset | PaymentCreditCardAsset | MediaAsset;
/**
 * Enumerates all possible asset types.
 */
type DataAssetType = 'PLAIN-TEXT' | 'ONLINE-ACCOUNT' | 'RECOVERY-CODE' | 'PIN-CODE' | 'API-KEY' | 'PRIVATE-KEY' | 'SEED-PHRASE' | 'PAYMENT-DEBIT-CARD' | 'PAYMENT-CREDIT-CARD' | 'DOCUMENT' | 'IMAGE' | 'VIDEO' | 'PDF';
/**
 * A secure, named asset that contains sensitive information such as passwords, keys, or account details.
 */
type DataAsset = {
    /**
     * Unique identifier of the asset.
     */
    id: string;
    /**
     * The type of secret stored. Used to determine how to parse and display the `secret` field.
     */
    type: DataAssetType;
    /**
     * Metadata describing the asset (e.g., name, notes).
     */
    meta: {
        /**
         * Display name for the asset.
         */
        name: string;
        /**
         * Optional notes or context for the asset.
         */
        notes?: string;
        /**
         * MIME type of the asset content (e.g. "application/pdf", "video/mp4").
         * Required when isMedia is true.
         */
        mimeType?: string;
        /**
         * True for binary media assets (DOCUMENT, IMAGE, VIDEO). When true, mimeType must be provided.
         * Used to correctly encode/decode the secret data during share generation and revelation.
         */
        isMedia?: boolean;
    };
    /**
     * The actual sensitive data, varying by asset type.
     */
    secret: SecretData;
};
/**
 * A simple plain text asset.
 */
type PlainTextAsset = {
    text: string;
};
/**
 * Credentials for logging into an app or website.
 */
type UserAndPasswordAsset = {
    appOrWebsite: string;
    email: string;
    username?: string;
    password: string;
};
/**
 * Backup recovery code for 2FA apps or websites.
 */
type RecoveryCodeAsset = {
    appOrWebsite: string;
    code: string;
};
/**
 * PIN code for a device or app.
 */
type PINCodeAsset = {
    deviceOrApp: string;
    code: string;
};
/**
 * API key for external services or apps.
 */
type ApiKeyAsset = {
    app: string;
    apiKey: string;
};
/**
 * Cryptocurrency private key and its associated public address.
 */
type PrivateKeyAsset = {
    publicAddress: string;
    privateKey: string;
};
/**
 * A seed phrase (mnemonic words) used to recover a crypto wallet.
 */
type SeedPhraseAsset = {
    words: string[];
};
/**
 * Sensitive information related to a debit card.
 */
type PaymentDebitCardAsset = {
    cardNumber: string;
    bank?: string;
    accountNumber?: string;
    cardHolderName?: string;
    expiryDate?: string;
    pinCode?: string;
    code?: string;
    clientId?: string;
};
/**
 * Sensitive information related to a credit card.
 */
type PaymentCreditCardAsset = {
    cardNumber: string;
    bank?: string;
    accountNumber?: string;
    cardHolderName?: string;
    expiryDate?: string;
    pinCode?: string;
    code?: string;
    clientId?: string;
};
/**
 * A binary media asset (document, image, or video file).
 *
 * When creating/sharing: `data` is a base64-encoded string.
 * When revealed via parseAssets({ denormalize: true }): `data` is a Blob with the correct MIME type.
 *
 * `mimeType` is stored inside the secret so it survives the SSDP+ round-trip
 * and is available during reconstruction without any extra metadata lookup.
 */
type MediaAsset = {
    /** Base64-encoded string (stored/shared) or a reconstructed Blob (after reveal). */
    data: string | Blob;
    /** MIME type of the content, e.g. "application/pdf" or "video/mp4". */
    mimeType: string;
};

declare class DataAssetManager {
    constructor();
    parseAssets(secrets: string, metadata: any, options?: {
        denormalize?: boolean;
    }): DataAsset[] | null;
    secrets(assets: DataAsset[]): ({
        text: string;
        id: string;
        type: DataAssetType;
    } | {
        appOrWebsite: string;
        email: string;
        username?: string;
        password: string;
        id: string;
        type: DataAssetType;
    } | {
        appOrWebsite: string;
        code: string;
        id: string;
        type: DataAssetType;
    } | {
        deviceOrApp: string;
        code: string;
        id: string;
        type: DataAssetType;
    } | {
        app: string;
        apiKey: string;
        id: string;
        type: DataAssetType;
    } | {
        publicAddress: string;
        privateKey: string;
        id: string;
        type: DataAssetType;
    } | {
        words: string[];
        id: string;
        type: DataAssetType;
    } | {
        cardNumber: string;
        bank?: string;
        accountNumber?: string;
        cardHolderName?: string;
        expiryDate?: string;
        pinCode?: string;
        code?: string;
        clientId?: string;
        id: string;
        type: DataAssetType;
    } | {
        cardNumber: string;
        bank?: string;
        accountNumber?: string;
        cardHolderName?: string;
        expiryDate?: string;
        pinCode?: string;
        code?: string;
        clientId?: string;
        id: string;
        type: DataAssetType;
    } | {
        data: string | Blob;
        mimeType: string;
        id: string;
        type: DataAssetType;
    })[];
    metadata(assets: DataAsset[]): {};
    toHex(assetsSecret: any[]): string;
    compress(assets: DataAsset[]): void;
    sanitizeAssetsValues(values: any): any[];
    private sanitizeValues;
    private base64ToBlob;
    private parseSecrets;
}

declare class DataAssetInputValidator {
    static validateOne(input: unknown): DataAsset;
    static safeValidateOne(input: unknown): {
        success: true;
        data: DataAsset;
    } | {
        success: false;
        errors: string[];
    };
    static validate(input: unknown): DataAsset[];
    static safeValidate(input: unknown): {
        success: true;
        data: DataAsset[];
    } | {
        success: false;
        errors: string[];
    };
}

type DataAssetMediaType = 'DOCUMENT' | 'IMAGE' | 'VIDEO';
type MagicFormat = 'PDF' | 'XLSX' | 'CSV' | 'JPEG' | 'PNG' | 'WEBP' | 'MP4' | 'MOV' | 'WEBM' | 'UNKNOWN';
type MediaFileLike = Blob & {
    name?: string;
    type?: string;
};
interface ValidateDataAssetMediaFileInput {
    assetType: DataAssetMediaType;
    file: MediaFileLike;
    maxSizeInBytes: number;
}
interface ValidatedDataAssetMediaFile {
    assetType: DataAssetMediaType;
    extension: string;
    mimeType: string;
    size: number;
    detectedFormat: Exclude<MagicFormat, 'UNKNOWN'>;
}
type ValidationSuccess = {
    success: true;
    data: ValidatedDataAssetMediaFile;
};
type ValidationFailure = {
    success: false;
    errors: string[];
};
declare class DataAssetMediaFileValidator {
    static safeValidate(input: ValidateDataAssetMediaFileInput): Promise<ValidationSuccess | ValidationFailure>;
    static validate(input: ValidateDataAssetMediaFileInput): Promise<ValidatedDataAssetMediaFile>;
}
declare function validateDataAssetMediaFile(input: ValidateDataAssetMediaFileInput): Promise<ValidatedDataAssetMediaFile>;

interface DataAssetShareProps {
    id?: string;
    name: string;
    notes?: string;
}
declare class DataAssetBuilder {
    static plainText(props: {
        secret: PlainTextAsset;
    } & Omit<DataAssetShareProps, 'notes'>): DataAsset;
    static userAndPassword(props: {
        secret: UserAndPasswordAsset;
    } & DataAssetShareProps): DataAsset;
    static recoveryCode(props: {
        secret: RecoveryCodeAsset;
    } & DataAssetShareProps): DataAsset;
    static pinCode(props: {
        secret: PINCodeAsset;
    } & DataAssetShareProps): DataAsset;
    static apiKey(props: {
        secret: ApiKeyAsset;
    } & DataAssetShareProps): DataAsset;
    static privateKey(props: {
        secret: PrivateKeyAsset;
    } & DataAssetShareProps): DataAsset;
    static seedPhrase(props: {
        secret: SeedPhraseAsset;
    } & DataAssetShareProps): DataAsset;
    static paymentDebitCard(props: {
        secret: PaymentDebitCardAsset;
    } & DataAssetShareProps): DataAsset;
    static paymentCreditCard(props: {
        secret: PaymentCreditCardAsset;
    } & DataAssetShareProps): DataAsset;
}

/**
 * The category a data asset belongs to.
 */
type DataAssetCategoryId = 'GENERAL-DATA' | 'ONLINE-ACCOUNT' | 'DEV-KEYS-SECRETS' | 'CRYPTO-WALLETS' | 'PAYMENT-CARD' | 'MEDIA-FILES';
/**
 * Core (static) definition of a data asset type.
 * Does not include UI-specific concerns like translated name/description
 * or form/previewer components — those are injected by the consumer via resolve().
 */
interface DataAssetCoreDef {
    /** Asset type identifier (e.g. 'PLAIN-TEXT', 'USER-PSWD'). */
    id: string;
    /** Short code abbreviation (e.g. 'PTXT'). */
    code: string;
    /** Category this asset belongs to. */
    category: DataAssetCategoryId;
    /** FontAwesome icon name (kebab-case). */
    iconName: string;
    /** Secret field names relevant to this asset type. */
    fields: string[];
    /** Whether this asset type requires a full plan subscription. */
    requiresFullPlan: boolean;
}
/**
 * Core (static) definition of a data asset category.
 * The name is intentionally omitted — supply it via resolveCategories().
 */
interface DataAssetCategoryCoreDef {
    /** Category identifier. */
    id: DataAssetCategoryId;
    /** Display order (ascending). */
    order: number;
    /** FontAwesome icon name (kebab-case). */
    iconName: string;
}
/**
 * Provides the canonical list of data asset type and category definitions.
 *
 * Core definitions hold structural metadata only (id, code, category, icon, fields).
 * UI-specific concerns — translated name/description, Form, Previewer — are injected
 * by the consumer via resolve() / resolveCategories(), keeping the SDK decoupled from
 * any i18n or UI framework.
 *
 * @example
 * ```typescript
 * const service = new DataAssetDefinitionService();
 *
 * const assets = service.resolve(def => ({
 *     name: translate(`assets.${def.id}.name`),
 *     description: translate(`assets.${def.id}.description`),
 *     Form: formMap[def.id],
 *     Previewer: previewerMap[def.id],
 * }));
 *
 * const categories = service.resolveCategories(cat => ({
 *     name: translate(`categories.${cat.id}.name`),
 * }));
 * ```
 */
declare class DataAssetDefinitionService {
    /** Returns all core asset definitions without any consumer extensions. */
    getCoreDefinitions(): DataAssetCoreDef[];
    /** Returns all core category definitions without any consumer extensions. */
    getCoreCategories(): DataAssetCategoryCoreDef[];
    /**
     * Returns all asset definitions merged with the result of the resolver callback.
     * Use this to attach translated name/description, Form, Previewer, or any other
     * UI-layer properties without coupling the SDK to a specific framework.
     *
     * @param resolver Called once per definition; its return value is spread onto the def.
     */
    resolve<TExtra>(resolver: (def: DataAssetCoreDef) => TExtra): (DataAssetCoreDef & TExtra)[];
    /**
     * Returns all category definitions merged with the result of the resolver callback.
     * Use this to attach a translated name (or any other UI-layer property) per category.
     *
     * @param resolver Called once per category; its return value is spread onto the def.
     */
    resolveCategories<TExtra>(resolver: (def: DataAssetCategoryCoreDef) => TExtra): (DataAssetCategoryCoreDef & TExtra)[];
}

/**
 * Props used to create a new protection plan.
 */
interface ProtectionPlanInput {
    /**
     * Optional ID for the plan. Usually used for updates or internal references.
     */
    id?: string;
    /**
     * Plan type
     */
    type: 'BACKUP' | 'INHERITANCE';
    /**
     * Optional code to identify the plan in a human-readable way.
     */
    code?: string;
    /**
     * Details such as the plan title and description.
     */
    details: PlanDetailsInput;
    /**
     * Plan owner
     */
    owner?: PlanOwnerInput;
    /**
     * List of beneficiaries with their storage and identity information.
     */
    beneficiaries: PlanBeneficiaryInput[];
    /**
     * Configuration for how shares are distributed and recovered.
     */
    sharesConfiguration: PlanSharesConfigurationInput;
    /**
     * Configuration for storage options including blockchain and verification methods.
     */
    storageConfiguration: PlanStorageConfigurationInput;
    /**
     * List of triggers that initiate the plan.
     */
    triggers: PlanTriggerInput[];
    /**
     * Data assets associated with the plan.
     */
    assets: (DataAsset | Omit<DataAsset, "id"> & {
        id?: string;
    })[];
}
interface PlanOwnerInput {
    id: string;
    firstName: string;
    lastName: string;
    email: string;
}
/**
 * Metadata describing the protection plan.
 */
interface PlanDetailsInput {
    /**
     * Title of the plan.
     */
    title: string;
    /**
     * Optional public description of the plan.
     */
    description?: string;
    /**
     * Optional private notes, only visible to the plan owner.
     */
    privateNotes?: string;
}
/**
 * Blockchain options for storing plan data.
 */
type BlockChainStorageOption$1 = 'VECHAIN' | 'ETHEREUM' | 'OPTIMISM' | 'INHERITI_CHAIN';
/**
 * Verification options for mobile shares.
 */
type MobileShareVerificationOption = 'INHERITI' | 'MOBILE_E2EE';
/**
 * Base details shared by all beneficiaries.
 */
interface BaseBeneficiaryDetails {
    id?: string;
    firstName: string;
    lastName: string;
    code?: string;
}
/**
 * SAFEKEY_PRO beneficiary with optional email.
 */
interface SafeKeyProBeneficiary extends BaseBeneficiaryDetails {
    email?: string;
}
/**
 * SAFEKEY_MOBILE beneficiary with required email.
 */
interface SafeKeyMobileBeneficiary extends BaseBeneficiaryDetails {
    email: string;
}
/**
 * Base input for all plan beneficiaries.
 */
interface BasePlanBeneficiaryInput {
    /**
     * Whether this beneficiary is a merge authority.
     */
    isMergeAuthority: boolean;
}
/**
 * Beneficiary input for the plan, which includes either SAFEKEY_PRO or SAFEKEY_MOBILE options.
 */
type PlanBeneficiaryInput = (BasePlanBeneficiaryInput & {
    storage: 'SAFEKEY_PRO';
    details: SafeKeyProBeneficiary;
}) | (BasePlanBeneficiaryInput & {
    storage: 'SAFEKEY_MOBILE';
    details: SafeKeyMobileBeneficiary;
});
/**
 * Countdown timer configuration for a trigger.
 */
interface TriggerCountdown {
    days: number;
    hours: number;
    minutes: number;
}
/**
 * Email-based trigger settings.
 */
type EmailTrigger = {
    id: 'LOGIN' | 'CLICK_LINK';
    countdown: TriggerCountdown;
    settings: {
        email: string;
    };
};
/**
 * Phone-based trigger settings.
 */
type PhoneTrigger = {
    id: 'SMS' | 'PHONE_CALL';
    countdown: TriggerCountdown;
    settings: {
        phone: string;
    };
};
type MainStorage = BlockChainStorageOption$1 | 'HSM' | "VAULT";
/**
 * Union of all supported trigger types.
 */
type PlanTriggerInput = EmailTrigger | PhoneTrigger;
/**
 * Configuration for where and how plan data is stored.
 */
interface PlanStorageConfigurationInput {
    /**
     * Option for the protection plan to store validator & recovery shares
     */
    option: MainStorage;
    /**
     * Method to verify shares stored in Safekey Mobile App
     */
    mobileShareVerification?: MobileShareVerificationOption;
}
/**
 * Configuration for how many shares are created and how many are needed to merge.
 */
interface PlanSharesConfigurationInput {
    /**
     * Recovery shares to overpass missing shares
     */
    recoverySharesAmount: number;
    /**
     * Min amount of shares needed to open the plan
     */
    mergeThreshold: number;
}

type BlockChainStorageOption = 'VECHAIN' | 'ETHEREUM' | 'OPTIMISM' | 'INHERITI_CHAIN';
type PlanStorageOption = 'SAFEKEY_PRO' | 'SAFEKEY_MOBILE' | 'VAULT' | 'HSM' | BlockChainStorageOption;
interface StorageOptionProps {
    id: PlanStorageOption;
    deviceId?: string;
    devicePassword?: string;
}
interface StorageOptionPrimitiveProps extends StorageOptionProps {
}
declare class StorageOption {
    private props;
    constructor(props: StorageOptionProps);
    static get validBlockChainOptions(): BlockChainStorageOption[];
    get id(): PlanStorageOption;
    get isSafekey(): boolean;
    get isSafekeyMobile(): boolean;
    get isBlockchain(): boolean;
    get deviceId(): string | undefined;
    get devicePassword(): string | undefined;
    get name(): "HSM" | "SafeKey Pro" | "SafeKey Mobile" | "vechain" | "Ethereum" | "Optimism" | "Inheriti® Chain" | "Vault" | "Unknown Name";
    get isBlockChain(): boolean;
    get isVault(): boolean;
    get isMobile(): boolean;
    get isCold(): boolean;
    static fromPrimitives(props: StorageOptionPrimitiveProps): StorageOption;
    setDeviceId(id: string): void;
    setDevicePassword(password: string): void;
    toPrimitives(): StorageOptionPrimitiveProps;
}

interface ShareholderProps {
    id: string;
    beneficiary: Beneficiary;
    storage: StorageOption;
    isMergeAuthority: boolean;
    isOwner?: boolean;
}
interface ShareholderPrimitiveProps extends Omit<ShareholderProps, 'storage' | 'beneficiary'> {
    storage: StorageOptionPrimitiveProps;
    beneficiary: BeneficiaryPrimitiveProps;
}
declare class Shareholder {
    private props;
    constructor(props: ShareholderProps);
    get beneficiary(): Beneficiary;
    get id(): string;
    get fullName(): string | undefined;
    get lastName(): string | undefined;
    get description(): "" | "Wife" | "Husband" | "Spouse" | "Child" | "Grandchild" | "Parent" | "Grandparent" | "Family member" | "Friend" | "Business Partner" | "Colleague" | "Lawyer" | "Notary" | "Trustee" | "Executor" | "Other" | undefined;
    get isMergeAuthority(): boolean;
    get isOwner(): boolean | undefined;
    get profilePictureUrl(): string | undefined;
    get email(): string | undefined;
    get storage(): StorageOption;
    /** @ignore */
    static fromPrimitives(props: ShareholderPrimitiveProps): Shareholder;
    /** @ignore */
    toPrimitives(): ShareholderPrimitiveProps;
}

type ShareType$1 = 'VALIDATOR' | 'BENEFICIARY' | 'BACKUP';
type ShareStatus = 'DISTRIBUTED' | 'PENDING' | 'CLAIMED' | 'RELEASED' | 'COLLECTED' | "PENDING_CLAIM" | "PENDING_VERIFICATION";
type ShareCreationStatus = 'UNCREATED' | 'CREATING' | 'CREATED' | 'DISTRIBUTING' | 'DISTRIBUTED';
interface PlanShareProps {
    id: string;
    shareholder?: Shareholder;
    addresses: string[];
    shareData?: string[];
    type: ShareType$1;
    storage: StorageOption;
    status: ShareStatus;
    creationStatus: ShareCreationStatus;
    claimedAt?: Date;
    verifiedAt?: Date;
    mobileShareVerification?: string;
}
interface PlanSharePrimitiveProps extends Omit<PlanShareProps, 'shareholder' | 'storage'> {
    shareholder?: ShareholderPrimitiveProps;
    storage: StorageOptionPrimitiveProps;
}
declare class PlanShare {
    private props;
    constructor(props: PlanShareProps);
    get id(): string;
    get endToEndEncrypted(): boolean;
    get deviceId(): string | undefined;
    get shareholderEmail(): string | undefined;
    get shareholder(): Shareholder | undefined;
    get addressesCount(): number;
    get addresses(): string[];
    get shareData(): string[] | undefined;
    get isValidator(): boolean;
    get isInBlockchain(): boolean;
    get isInVault(): boolean;
    get typeName(): "" | "Merge Authority shares" | "Beneficiary shares" | "Recovery shares" | "Validator share";
    get storageName(): "HSM" | "SafeKey Pro" | "SafeKey Mobile" | "vechain" | "Ethereum" | "Optimism" | "Inheriti® Chain" | "Vault" | "Unknown Name";
    get status(): ShareStatus;
    get creationStatus(): ShareCreationStatus;
    get isCreating(): boolean;
    get isDistributing(): boolean;
    get isCollecting(): boolean;
    get isCollected(): boolean;
    get isDistributed(): boolean;
    get type(): ShareType$1;
    get generalType(): ShareType$1 | "COLD" | "MOBILE";
    get isBackup(): boolean;
    get isMobile(): boolean;
    get isCold(): boolean;
    get isBeneficiary(): boolean;
    get isMergeAuthority(): boolean;
    get storage(): StorageOption;
    get claimedAt(): Date | null;
    get isClaimed(): boolean;
    get isVerified(): boolean;
    get isPending(): boolean;
    get shareholderId(): string | undefined;
    /** @ignore */
    static fromPrimitives(props: PlanSharePrimitiveProps): PlanShare;
    reset(): void;
    updateStatus(status: ShareStatus): void;
    updateCreationStatus(status: ShareCreationStatus): void;
    updateAddresses(addresses: string[]): void;
    setShareData(data: string[]): void;
    setCollecting(): void;
    setDeviceId(id: string): void;
    setDevicePassword(password: string): void;
    /** @ignore */
    toPrimitives(): PlanSharePrimitiveProps;
}

interface ProtectionPlanPassphraseProps {
    validator?: string;
    backup?: string;
    mobile?: string;
}
interface ProtectionPlanPassphrasePrimitiveProps extends ProtectionPlanPassphraseProps {
}
declare class ProtectionPlanPassphrase {
    private props;
    constructor(props: ProtectionPlanPassphraseProps);
    get validator(): string | undefined;
    get backup(): string | undefined;
    get mobile(): string | undefined;
    static fromPrimitives(primitives: ProtectionPlanPassphrasePrimitiveProps): ProtectionPlanPassphrase;
    static merge(entity: ProtectionPlanPassphrase, props: Partial<ProtectionPlanPassphraseProps>): ProtectionPlanPassphrase;
    static fromEmpty(): ProtectionPlanPassphrase;
    toPrimitives(): ProtectionPlanPassphrasePrimitiveProps;
}

type TriggerType = 'LOGIN' | 'CLICK_LINK' | 'SAFEKEY_2FA' | 'SMS' | 'PHONE_CALL';
type TriggerStatus = 'PENDING' | 'LOCKED' | 'UNLOCKED';
type MergeTriggerStatus = 'PENDING' | 'EXPIRED' | 'LOCKED' | 'DENIED' | 'ACTIVATED';
interface TriggerProps {
    id: TriggerType;
    countdown?: {
        days: number;
        hours: number;
        minutes: number;
        seconds: number;
    };
    settings?: {
        email?: string;
        phone?: string;
    };
    status: TriggerStatus;
    mergeStatus: MergeTriggerStatus;
}
interface TriggerPrimitiveProps extends Omit<TriggerProps, 'storage'> {
}
declare class Trigger {
    private props;
    constructor(props: TriggerProps);
    static get emailTriggers(): string[];
    static get phoneTriggers(): string[];
    get id(): TriggerType;
    get status(): TriggerStatus;
    get viewStatus(): any;
    get mergeStatus(): MergeTriggerStatus;
    get countdown(): {
        days: number;
        hours: number;
        minutes: number;
        seconds: number;
    } | undefined;
    get isEmailTarget(): boolean;
    get isPhoneTarget(): boolean;
    get isPending(): boolean;
    get isExpired(): boolean;
    get isDenied(): boolean;
    get target(): string | undefined;
    /** @ignore */
    static fromPrimitives(props: TriggerPrimitiveProps): Trigger;
    /** @ignore */
    toPrimitives(): TriggerPrimitiveProps;
}

interface PersonalProtectionPlanViewProps {
    id: string;
    code: string;
    owner: {
        id: string;
        firstName: string;
        lastName: string;
        profilePicture?: string;
    };
    name: string;
    description?: string;
    privateNotes?: string;
    data?: string;
    createdAt: Date;
    contractAddress?: string;
    network?: string;
    status: ProtectionPlanStatus;
    triggers: string[];
    mergeThreshold: number;
    mergeCount: number;
    lastReleasedAt?: Date;
    shareholders: {
        id: string;
        storageOption: StorageOption;
    }[];
    shares: {
        addressCount: number;
        type: string;
        shareholderId: string;
        storageOption: StorageOption;
    }[];
    chain: {
        id: string;
        name: string;
    };
    type: 'BACKUP' | 'INHERITANCE';
    isFree?: boolean;
}
declare class PersonalProtectionPlanView {
    private props;
    constructor(props: PersonalProtectionPlanViewProps);
    get id(): string;
    get code(): string;
    get isFree(): boolean | undefined;
    get isBackupPlan(): boolean;
    get storageLayers(): string[];
    get chain(): {
        id: string;
        name: string;
    };
    get network(): string | undefined;
    get triggers(): string[];
    get owner(): {
        id: string;
        firstName: string;
        lastName: string;
        profilePicture?: string;
    };
    get name(): string;
    get description(): string | undefined;
    get lastReleasedAt(): Date | undefined;
    get mergeThreshold(): number;
    get mergeCount(): number;
    get privateNotes(): string | undefined;
    get mobileSharesCount(): number;
    get coldSharesCount(): number;
    get backupSharesCount(): number;
    get sharesCount(): number;
    get data(): string | undefined;
    get createdAt(): Date;
    get contractAddress(): string | undefined;
    get status(): ProtectionPlanStatus;
    get type(): "BACKUP" | "INHERITANCE";
}

type OnlyOne<T, K extends keyof T = keyof T> = {
    [P in K]: Pick<T, P> & Partial<Record<Exclude<K, P>, never>>;
}[K];

type ProtectionPlanStatus = 'PROTECTED' | 'DRAFT' | 'FAILED' | 'PENDING_SHARES' | 'MERGING_INITIALIZED' | 'MERGING_IN_PROGRESS' | 'SHARES_MERGED' | 'DATA_RELEASED';
interface PlanPrivateKeys {
    validator?: string;
    backup?: string;
}
interface PlanActiveMergeProcess {
    id: string;
    initializedAt?: Date;
    expiresAt?: Date;
}
interface ProtectionPlanProps {
    id: string;
    code: string;
    contractAddress?: string;
    network?: string;
    passphrase?: ProtectionPlanPassphrase;
    privateKeys?: PlanPrivateKeys;
    owner: {
        id: string;
        firstName: string;
        lastName: string;
        profilePicture?: string;
    };
    details: {
        name: string;
        description?: string;
        privateNotes?: string;
    };
    mergeThreshold: number;
    encryptedData?: string;
    status: ProtectionPlanStatus;
    triggers: Trigger[];
    shares: PlanShare[];
    isDraft: boolean;
    createdAt: Date;
    type: 'BACKUP' | 'INHERITANCE';
    paidAt?: Date;
    activeMergeProcess?: PlanActiveMergeProcess;
    assetsMetadata: any;
    assetsConfig?: string;
    lastReleasedAt?: Date;
    mergeCount: number;
    lastReleaseRequest?: Date;
    isFree?: boolean;
    configuredAt?: Date;
    shareholders: Shareholder[];
    legacy?: any;
}
interface ProtectionPlanPrimitiveProps extends Omit<ProtectionPlanProps, 'passphrase' | 'shares' | 'triggers' | "shareholders"> {
    shares: PlanSharePrimitiveProps[];
    triggers: TriggerPrimitiveProps[];
    passphrase?: ProtectionPlanPassphrasePrimitiveProps;
    shareholders: ShareholderPrimitiveProps[];
}
declare class PersonalProtectionPlan {
    protected props: ProtectionPlanProps;
    constructor(props: ProtectionPlanProps);
    get isConfigured(): boolean;
    get isBlockchain(): boolean;
    get assetsConfig(): string | undefined;
    get id(): string;
    get isFree(): boolean | undefined;
    get isTestNet(): boolean;
    get encryptedData(): string | undefined;
    get isReleased(): boolean;
    get remainingSecondsForClose(): number | undefined;
    get timeoutMinutesForClose(): number;
    get mergeExpiresAt(): Date | undefined;
    get details(): {
        name: string;
        description?: string;
        privateNotes?: string;
    };
    get name(): string;
    get network(): string | undefined;
    get code(): string;
    get status(): ProtectionPlanStatus;
    get isInMergeProcess(): boolean;
    get isDraft(): boolean;
    get isPendingShares(): boolean;
    get description(): string | undefined;
    get createdAt(): Date;
    get triggers(): Trigger[];
    get pendingTrigger(): Trigger | undefined;
    get unresolvedTrigger(): Trigger | undefined;
    get backupSharesAmount(): number;
    get mobileSharesAmount(): number;
    get coldSharesAmount(): number;
    get mobileShares(): PlanShare[];
    get coldShares(): PlanShare[];
    get planMainStorage(): PlanStorageOption;
    get planMainChain(): PlanStorageOption;
    get validatorShares(): PlanShare[];
    get backupShares(): PlanShare[];
    get beneficiaryShares(): PlanShare[];
    get shares(): PlanShare[];
    get ownerId(): string;
    get owner(): {
        fullName: string;
        id: string;
        firstName: string;
        lastName: string;
        profilePicture?: string;
    };
    get mergeThreshold(): number;
    get isBackupPlan(): boolean;
    get type(): "BACKUP" | "INHERITANCE";
    get contractAddress(): string | undefined;
    get hasDataReleased(): boolean;
    get privateKeys(): PlanPrivateKeys | undefined;
    get isProtected(): boolean;
    get mergeCount(): number;
    get lastReleasedAt(): Date | undefined;
    get isLegacy(): boolean;
    get storageLayers(): {
        id: PlanStorageOption;
        name: string;
    }[];
    get requiresMobileEndToEndEncryption(): boolean;
    get lastReleaseRequest(): Date | undefined;
    get privateNotes(): string | undefined;
    get shareholders(): Shareholder[];
    toView(): PersonalProtectionPlanView;
    static fromPrimitives(props: ProtectionPlanPrimitiveProps): PersonalProtectionPlan;
    findShareholderByDeviceId(deviceId: string): Shareholder | undefined;
    findShareholderByCriteria(beneficiary: OnlyOne<{
        id: string;
        email: string;
        code: string;
        deviceId: string;
    }>): Shareholder | undefined;
    markAsPendingShares(): void;
    markAsProtected(): void;
    isMergeAuthority(id: string): boolean;
    findBeneficiaryShare(id: string): PlanShare | undefined;
    findShareByDeviceId(deviceId: string): PlanShare | undefined;
    updateColdShare(share: PlanShare): void;
    updateMobileShare(share: PlanShare): void;
    setContractAddress(address: string): void;
    toPrimitives(): ProtectionPlanPrimitiveProps;
    findShare(shareId: string): PlanShare | undefined;
    updatePlanPassphrase(passphrase: ProtectionPlanPassphraseProps): void;
    updatePrivateKeys(keys: PlanPrivateKeys): void;
    setHexData(data: any): void;
    private matchesShareType;
    updateSharesCreationStatus(type: ShareType$1 | 'COLD' | 'MOBILE', status: ShareCreationStatus, shareId?: string): void;
    updateShareDeviceInfo(shareId: string, data: {
        deviceId: string;
        devicePassword?: string;
    }): void;
    updateSharesAddresses(type: ShareType$1 | 'COLD' | 'MOBILE', shares: {
        [p: string]: string[];
    }): void;
}

interface PlanTriggerView {
    id: TriggerType;
    countdown?: {
        days: number;
        hours: number;
        minutes: number;
        seconds?: number;
    };
    settings?: {
        email?: string;
        phone?: string;
    };
    status: TriggerStatus | MergeTriggerStatus;
}
type PlanBeneficiaryRelationView = 'WIFE' | 'HUSBAND' | 'SPOUSE' | 'CHILD' | 'GRANDCHILD' | 'PARENT' | 'GRANDPARENT' | 'FAMILY_MEMBER' | 'FRIEND' | 'BUSINESS_PARTNER' | 'COLLEAGUE' | 'LAWYER' | 'NOTARY' | 'TRUSTEE' | 'EXECUTOR' | 'OTHER';
interface PlanBeneficiaryView {
    id: string;
    firstName: string;
    lastName?: string;
    email?: string;
    code?: string;
    relation?: PlanBeneficiaryRelationView;
    profilePictureUrl?: string;
}
interface ShareholderView {
    id: string;
    beneficiary: PlanBeneficiaryView;
    storage: PlanStorageOption;
    deviceId?: string;
    isMergeAuthority: boolean;
    isOwner?: boolean;
}
interface PlanShareView {
    id: string;
    shareholder?: ShareholderView;
    identifiers: string[];
    type: ShareType$1;
    storage: PlanStorageOption;
    status: ShareStatus;
    claimedAt?: Date;
    verifiedAt?: Date;
    mobileShareVerification?: string;
}
interface PlanStorageLayer {
    id: string;
    name: string;
}
/**
 * Summary representation of a protection plan
 *
 */
interface ProtectionPlanSummaryProps {
    id: string;
    code: string;
    mergeThreshold: number;
    owner: {
        id: string;
        firstName: string;
        lastName: string;
        profilePictureUrl?: string;
    };
    details: {
        name: string;
        description?: string;
        privateNotes?: string;
    };
    shares: PlanShareView[];
    status: ProtectionPlanStatus;
    triggers: PlanTriggerView[];
    contractAddress?: string;
    storage?: BlockChainStorageOption | 'HSM';
    network?: 'TESTNET' | 'MAINNET';
    createdAt: Date;
    configuredAt?: Date;
    lastReleasedAt?: Date;
    mergeCount: number;
    type: 'BACKUP' | 'INHERITANCE';
    beneficiaries: PlanBeneficiaryView[];
    storageLayers: PlanStorageLayer[];
}
type BeneficiaryShare = Omit<PlanShareView, 'shareholder'> & {
    shareholder: Omit<ShareholderView, 'beneficiary'> & {
        beneficiary: PlanBeneficiaryView;
    };
};
interface ProtectionPlanSummaryPrimitiveProps extends Omit<ProtectionPlanSummaryProps, 'type'> {
    type: string;
}
/**
 * Class that represents a protection plan summary.
 *
 */
declare class ProtectionPlanSummary {
    private props;
    /** @ignore */
    constructor(props: ProtectionPlanSummaryProps);
    /**
     * Unique identifier of the protection plan.
     */
    get id(): string;
    /**
     * Type
     */
    get type(): "BACKUP" | "INHERITANCE";
    /**
     * Type
     */
    get isConfigured(): boolean;
    get isProtected(): boolean;
    get canConfigurePlan(): boolean;
    get canMergePlan(): boolean;
    /**
     * Status
     */
    get status(): ProtectionPlanStatus;
    /**
     * Merge threshold
     */
    get mergeThreshold(): number;
    /**
     * Storage layers
     */
    get storageLayers(): PlanStorageLayer[];
    /**
     * Human-readable code associated with the plan.
     */
    get code(): string;
    /**
     * Plan owner details.
     */
    get owner(): {
        id: string;
        firstName: string;
        lastName: string;
        profilePictureUrl?: string;
    };
    /**
     * Details describing the plan (e.g., name, description).
     */
    get details(): {
        name: string;
        description?: string;
        privateNotes?: string;
    };
    /**
     * Share allocations defined in the plan.
     */
    get shares(): PlanShareView[];
    /**
     * Storage type
     */
    get storageType(): "BLOCKCHAIN" | "HSM" | "VAULT";
    /**
     * Beneficiary shares
     */
    get beneficiaryShares(): BeneficiaryShare[];
    /**
     * Conditions or events that trigger the plan execution.
     */
    get triggers(): PlanTriggerView[];
    /**
     * On-chain contract address where the plan is deployed (if any).
     */
    get contractAddress(): string | undefined;
    /**
     * Main storage
     */
    get storage(): "HSM" | BlockChainStorageOption | undefined;
    /**
     * Recovery shares amount
     */
    get recoverySharesAmount(): number;
    /**
     * Merge Authority beneficiaries
     */
    get mergeAuthorityBeneficiaries(): BeneficiaryShare[];
    /**
     * Network
     */
    get network(): "TESTNET" | "MAINNET" | undefined;
    /**
     * Date when the plan was created.
     */
    get createdAt(): Date;
    /**
     * Fully-resolved list of beneficiaries involved in the plan.
     */
    get beneficiaries(): PlanBeneficiaryView[];
    get validatorSharesCount(): number;
    get mobileSharesCount(): number;
    get coldSharesCount(): number;
    get recoverySharesCount(): number;
    /** @ignore */
    static fromPrimitives(props: ProtectionPlanSummaryPrimitiveProps): ProtectionPlanSummary;
    /** @ignore */
    static fromProtectionPlan(plan: PersonalProtectionPlan): ProtectionPlanSummary;
    private static mapShareholder;
    private static mapBeneficiary;
    /**
     * Return class object to pure JSON
     */
    toPrimitives(): ProtectionPlanSummaryPrimitiveProps;
    findShareByDeviceId(deviceId: string): PlanShareView | undefined;
    findShareByBeneficiaryEmail(email: string): PlanShareView | undefined;
    isUserMergeAuthority(email: string): boolean | undefined;
    findBeneficiaryBy(beneficiary: OnlyOne<{
        id: string;
        email: string;
        code: string;
    }>): PlanBeneficiaryView | undefined;
    findShareholderBy(beneficiary: OnlyOne<{
        id: string;
        email: string;
        code: string;
    }>): (Omit<ShareholderView, "beneficiary"> & {
        beneficiary: PlanBeneficiaryView;
    }) | undefined;
}

interface ProcessStepProps {
    id: string;
    status: 'COMPLETE' | 'INCOMPLETE' | 'IN_PROCESS';
}
interface ProcessStepPrimitiveProps extends ProcessStepProps {
}
declare class ProcessStep<T> {
    private props;
    constructor(props: ProcessStepProps & T);
    get id(): string;
    get isComplete(): boolean;
    get status(): "IN_PROCESS" | "COMPLETE" | "INCOMPLETE";
    get isPending(): boolean;
    get isInProcess(): boolean;
    static fromPrimitives(props: ProcessStepPrimitiveProps): ProcessStep<unknown>;
    reset(): void;
    markAsComplete(): void;
    markAsInProgress(): void;
    markAsIncomplete(): void;
    toPrimitives(): ProcessStepPrimitiveProps;
}

interface AppProcessProps<ChildStepProps> {
    id: string;
    steps: ProcessStep<ChildStepProps>[];
    activeStep: number;
}
interface AppProcessPrimitiveProps<StepProps> extends Omit<AppProcessProps<StepProps>, 'steps'> {
    steps: ProcessStepPrimitiveProps[];
}
declare class AppProcess<ChildProcessProps, ChildStepProps> {
    protected props: AppProcessProps<ChildStepProps> & ChildProcessProps;
    constructor(props: AppProcessProps<ChildStepProps> & ChildProcessProps);
    get id(): string;
    get completedStepCount(): number;
    get pendingStepCount(): number;
    get inProgressStep(): ProcessStep<ChildStepProps> | undefined;
    get stepCount(): number;
    get steps(): ProcessStep<ChildStepProps>[];
    get isCompleted(): boolean;
    get currentStep(): ProcessStep<ChildStepProps>;
    static fromPrimitives<ChildStepProps>(props: AppProcessPrimitiveProps<ChildStepProps>): AppProcess<{
        steps: ProcessStep<unknown>[];
        id: string;
        activeStep: number;
    }, unknown>;
    findStep(id: string): ProcessStep<ChildStepProps> | undefined;
    addStep(step: ProcessStep<ChildStepProps>): void;
    toPrimitives(): AppProcessPrimitiveProps<ChildStepProps>;
}

interface PlanConfigurationProcessProps extends AppProcessProps<any> {
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
    stepErrors?: Record<string, string>;
    stepsAttempts?: Record<string, number>;
    mobileSharesPassphrase?: string;
}
interface PlanConfigurationProcessPrimitiveProps extends Omit<AppProcessPrimitiveProps<any>, 'plan' | 'payment'> {
    plan: ProtectionPlanPrimitiveProps;
    planType: 'BACKUP' | 'INHERITANCE';
    stepErrors?: Record<string, string>;
    stepsAttempts?: Record<string, number>;
    mobileSharesPassphrase?: string;
}
interface PlanConfigurationProcessParam {
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
}
declare class PlanConfigurationProcess extends AppProcess<PlanConfigurationProcessProps, any> {
    constructor(props: PlanConfigurationProcessProps);
    get isDistributingColdShares(): boolean;
    get currentStep(): ProcessStep<any>;
    get plan(): PersonalProtectionPlan;
    get allPlanShares(): PlanShare[];
    get planColdShares(): PlanShare[];
    get planBackupShares(): PlanShare[];
    get planValidatorShares(): PlanShare[];
    get planType(): "BACKUP" | "INHERITANCE";
    get planId(): string;
    get planRequiresMobileEndToEndEncryption(): boolean;
    get mobileSharesPassphrase(): string | undefined;
    get activeStepIndex(): number;
    get planPrivateKeys(): PlanPrivateKeys | undefined;
    get hasErrors(): boolean;
    static create(props: PlanConfigurationProcessParam): PlanConfigurationProcess;
    static fromPrimitives(props: PlanConfigurationProcessPrimitiveProps): PlanConfigurationProcess;
    start(): void;
    reset(): void;
    completeStep(step: ProcessStep<any>): void;
    setPlanContractAddress(address: string): void;
    updatePlanPassphrase(passphrase: ProtectionPlanPassphraseProps): void;
    setMobileSharesPassPhrase(passphrase: string): void;
    updatePlanPrivateKeys(keys: PlanPrivateKeys): void;
    toPrimitives(): PlanConfigurationProcessPrimitiveProps;
    setStepError(id: string, message: string): void;
    updateStepAttempt(id: string): void;
    cleanStepError(id: string): void;
    getStepError(id: string): string | undefined;
    updatePlanSharesCreationStatus(type: ShareType$1 | 'COLD' | 'MOBILE', status: ShareCreationStatus, shareId?: string): void;
    updateUpdateShareDeviceInfo(shareId: string, data: {
        deviceId: string;
        devicePassword?: string;
    }): void;
    updatePlanSharesAddresses(type: ShareType$1 | 'COLD' | 'MOBILE', shares: {
        [p: string]: string[];
    }): void;
    stepCompleted(id: string): boolean | undefined;
}

type ConfigurationStatus = 'NOT_STARTED' | 'LOADING' | 'PLAN_CONFIGURATION' | 'SMART_CONTRACT_CREATION' | 'SHARES_CREATION' | 'VALIDATOR_SHARE_LINK' | 'BACKUP_SHARES_LINK' | 'MOBILE_SHARES_DISTRIBUTION' | 'COLD_SHARES_DISTRIBUTION' | 'FINALIZED';
interface PlanConfigurationBeneficiary {
    id: string;
    firstName: string;
    lastName: string | undefined;
    email: string | undefined;
    profilePictureUrl: string | undefined;
    isMergeAuthority?: boolean;
}
interface PlanConfigurationShare {
    id: string;
    type: ShareType$1;
    storage: string;
    identifiers: string[];
    status: ShareCreationStatus;
    beneficiary?: PlanConfigurationBeneficiary;
}
type PlanConfigurationBeneficiaryShare = Omit<PlanConfigurationShare, 'beneficiary'> & {
    beneficiary: PlanConfigurationBeneficiary & {
        isMergeAuthority: boolean;
    };
};
interface PlanConfigurationProcessViewProps {
    status: ConfigurationStatus;
    plan: {
        id: string;
        type: string;
    };
    shares: PlanConfigurationShare[];
    steps: {
        id: string;
        status: 'IN_PROCESS' | 'COMPLETE' | 'INCOMPLETE' | 'ERROR';
        errorMessage?: string;
    }[];
    hasErrors?: boolean;
}
declare class PlanConfigurationProcessView {
    private props;
    constructor(props: PlanConfigurationProcessViewProps);
    static notStarted(): PlanConfigurationProcessView;
    static loading(): PlanConfigurationProcessView;
    static build(process: PlanConfigurationProcess, status: ConfigurationStatus, currentColdBeneficiaryId?: string): PlanConfigurationProcessView;
    get status(): ConfigurationStatus;
    get isCompleted(): boolean;
    get planId(): string;
    get planType(): string;
    get hasErrors(): boolean | undefined;
    get steps(): {
        id: string;
        status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
        errorMessage?: string;
    }[];
    get activeStepId(): string | undefined;
    get activeStepIndex(): number;
    get completeProgress(): number;
    get completedSteps(): {
        id: string;
        status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
        errorMessage?: string;
    }[];
    get isInProgress(): boolean;
    get isFinalized(): boolean;
    get isStarted(): boolean;
    get allShares(): PlanConfigurationShare[];
    get recoveryShares(): PlanConfigurationShare[];
    get validatorShare(): PlanConfigurationShare | undefined;
    get coldShares(): PlanConfigurationBeneficiaryShare[];
    get mobileShares(): PlanConfigurationBeneficiaryShare[];
    get beneficiaryShares(): PlanConfigurationBeneficiaryShare[];
    get inProgressCreationShare(): PlanConfigurationShare | undefined;
    get isDistributingBeneficiaryShares(): string[];
    get inProgressDistributionShare(): PlanConfigurationShare | undefined;
    get currentBeneficiaryShare(): PlanConfigurationBeneficiaryShare | undefined;
    get groupSharesByType(): {
        type: ShareType$1;
        ids: string[];
        identifiersAmount: number;
        status: ShareCreationStatus;
    }[];
    getShareTypeAmount(type: ShareType$1): number;
}

interface BaseDeviceShareInfo {
    id: string;
    shares: string[];
    planId: string;
}
interface PersonalDeviceShareInfo extends BaseDeviceShareInfo {
    context: 'personal';
    isMergeAuthority: boolean;
    validatorSharePrivateKey: string;
    backupSharesPrivateKey?: string;
    mobileSharePassphrase?: string;
}
interface CustodianDeviceShareInfo extends BaseDeviceShareInfo {
    context: 'custodian';
}
type DeviceShareInfo = PersonalDeviceShareInfo | CustodianDeviceShareInfo;

interface LoadedShareData {
    type: string;
    data: string[] | PersonalDeviceShareInfo;
    isBackup: boolean;
}
type CollectedSharesData = LoadedShareData & {
    id: string;
};
interface RevealOptions {
    timeoutMinutes: number;
}
interface MergingProcessProps extends AppProcessProps<any> {
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
    backupStore?: any[];
    loadedShares?: {
        [shareId: string]: LoadedShareData;
    };
    activated: boolean;
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    revealOptions?: RevealOptions;
    expiresAt?: Date;
    pendingTrigger?: {
        id: string;
        startedAt: Date;
        expiresAt: Date;
    };
}
interface MergingProcessPrimitiveProps extends Omit<AppProcessPrimitiveProps<any>, 'plan'> {
    plan: ProtectionPlanPrimitiveProps;
    planType: 'BACKUP' | 'INHERITANCE';
    backupStore?: any[];
    loadedShares?: {
        [shareId: string]: LoadedShareData;
    };
    activated: boolean;
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    revealOptions?: RevealOptions;
    expiresAt?: Date;
    pendingTrigger?: {
        id: string;
        startedAt: Date;
        expiresAt: Date;
    };
}
interface MergingProcessParam {
    id: string;
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    expiresAt?: Date;
}
declare class MergingProcess extends AppProcess<MergingProcessProps, any> {
    constructor(props: MergingProcessProps);
    get allSharesLoaded(): boolean;
    get requiresSmartContract(): boolean;
    get isLegacyPlan(): boolean;
    get selectedBeneficiariesIds(): string[];
    get isCollectingMaShare(): boolean;
    get currentStep(): ProcessStep<any>;
    get planIsReleased(): boolean;
    get hasLoadedShares(): boolean;
    get plan(): PersonalProtectionPlan;
    get planRequiresMobileEndToEndEncryption(): boolean;
    get isActivated(): boolean;
    get ownerId(): string;
    get remainingColdShares(): PlanShare[] | undefined;
    get mergeAuthorityColdShare(): PlanShare | undefined;
    get remainingAdditionalColdShares(): PlanShare[];
    get remainingAdditionalMobileShareholdersIds(): string[];
    get planValidatorShares(): PlanShare[];
    get planMainChain(): PlanStorageOption;
    get isCollectingColdShares(): boolean;
    get selectedAdditionalPlanColdShares(): PlanShare[];
    get selectedAdditionalPlanMobileShares(): PlanShare[];
    get mobileShareInvitationSent(): boolean;
    get selectedAdditionalPlanMobileSharesAmount(): number;
    get selectedAdditionalPlanColdSharesAmount(): number;
    get planTitle(): string;
    get planCode(): string;
    get planType(): "BACKUP" | "INHERITANCE";
    get isBackupPlan(): boolean;
    get isInheritancePlan(): boolean;
    get planId(): string;
    get canBeMerged(): boolean;
    get planContractAddress(): string | undefined;
    get isPlanFree(): boolean | undefined;
    get allAdditionalColdSharesLoaded(): boolean;
    get mergeAuthorityShare(): PlanShare | undefined;
    get mergeAuthorityShareLoaded(): boolean;
    get allAdditionalMobileSharesLoaded(): boolean;
    get collectedShares(): CollectedSharesData[];
    get triggersRequestedAt(): Date | undefined;
    get backupStore(): any[] | undefined;
    get pendingTrigger(): {
        startedAt: Date;
        expiresAt: Date;
        id: string;
    } | undefined;
    private get activeStepIndex();
    static create(props: MergingProcessParam): MergingProcess;
    static buildInitialSteps(props: {
        plan: PersonalProtectionPlan;
        mergeAuthorityId: string;
        selectedBeneficiariesIds: MergingProcessParam["selectedBeneficiariesIds"];
    }): ProcessStep<unknown>[];
    static fromPrimitives(props: MergingProcessPrimitiveProps): MergingProcess;
    reset(): void;
    completeStep(step: ProcessStep<any>): void;
    completeStepById(stepId: string): void;
    markAsInProgress(stepId: string): void;
    isStepCompleted(stepId: string): boolean;
    complete(): void;
    setBackupSharesCollecting(): void;
    setBackupSharesCollected(shareData: any[]): void;
    setValidatorShareCollecting(): void;
    setValidatorShareCollected(shareData: any): void;
    setMobileShareCollected(share: PlanShare, shareData: any): void;
    setColdShareCollecting(share: PlanShare): void;
    setColdShareCollected(share: PlanShare, shareData: any): void;
    isShareCollected(share: PlanShare): boolean;
    toPrimitives(): MergingProcessPrimitiveProps;
    activate(): void;
    setMergeExpiration(mergeExpiresAt: Date): void;
    filterSelectedShares(shares: PlanShare[]): PlanShare[];
    private ensureAllParamsAreValid;
    private markNextAsInProgress;
    private setLoadedShare;
}

type MainTriggerStatus = TriggerStatus & MergeTriggerStatus;
type ShareType = 'VALIDATOR' | 'COLD' | 'MOBILE' | 'BACKUP';
type MergeStatus = 'NOT_STARTED' | 'ACTIVATE_TRIGGERS' | 'COLLECT_COLD_SHARES' | 'COLLECT_VALIDATOR_SHARE' | 'COLLECT_MOBILE_PLAN_SHARES' | 'COLLECT_MA_PLAN_SHARES' | 'AVAILABLE_TO_REVEAL' | 'REVEALING_DATA' | 'REVEALED' | 'FINISHED';
interface MergeProcessBuildState {
    /** Whether the cold-share collection sub-process is currently active */
    coldSharesInProgress?: boolean;
    /** Error from the last failed step */
    stepError?: any;
    /** Whether the data reveal is in progress */
    revealing?: boolean;
    /** Revealed plan data (set after RevealPlanDataUseCase succeeds) */
    planData?: DataAsset[] | null;
    /** True when auto-reveal is disabled and reveal is ready but not yet triggered */
    isAvailableToReveal?: boolean;
    /** Remaining seconds before the revealed data window closes */
    remainingTime?: number;
    /** Minutes configured for the data-release window */
    timeoutMinutesForClose?: number;
}
interface PlanMergeProcessViewProps {
    plan?: {
        id: string;
        type: string;
    };
    processId?: string;
    planRevealInfo?: {
        isReleased: boolean;
        remainingSecondsForClose?: number;
        timeoutMinutesForClose?: number;
    };
    shares: {
        id: string;
        status: 'WAITING' | 'COLLECTING' | 'COLLECTED' | 'RELEASED';
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    }[];
    revealedData: {
        secret: DataAsset[];
        timeoutMinutesForClose: number | undefined;
        remainingTime: number;
    } | undefined;
    triggers: {
        countdown: {
            days: number;
            hours: number;
            minutes: number;
            seconds: number;
        } | undefined;
        startedAt: Date | undefined;
        id: 'LOGIN' | 'CLICK_LINK' | 'SAFEKEY_2FA' | 'SMS' | 'PHONE_CALL';
        requiresVerification: boolean;
        status: MainTriggerStatus;
        expiresAt: Date | undefined;
        target: string;
    }[];
    steps: {
        id: string;
        status: 'IN_PROCESS' | 'COMPLETE' | 'INCOMPLETE' | 'ERROR';
        errorMessage?: string;
    }[];
    status: MergeStatus;
}
declare class PlanMergeProcessView {
    private props;
    constructor(props: PlanMergeProcessViewProps);
    static notStarted(): PlanMergeProcessView;
    static build(plan?: PersonalProtectionPlan, process?: MergingProcess, state?: MergeProcessBuildState): PlanMergeProcessView;
    /**
     * Returns a new view with runtime state overlaid on top of the fetched data.
     * Call this in the hook to apply ephemeral state (errors, revealing, cold shares, etc.)
     * without re-fetching from the server.
     */
    withState(state: MergeProcessBuildState): PlanMergeProcessView;
    get steps(): {
        id: string;
        status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
        errorMessage?: string;
    }[];
    get planId(): string | undefined;
    get processId(): string | undefined;
    get planRevealInfo(): {
        isReleased: boolean;
        remainingSecondsForClose?: number;
        timeoutMinutesForClose?: number;
    } | undefined;
    get planType(): string | undefined;
    get isFinished(): boolean;
    get activeStepId(): string | undefined;
    get status(): MergeStatus;
    get mergeAuthorityShareStorageType(): "COLD" | "MOBILE";
    get completeProgress(): number;
    get completedSteps(): {
        id: string;
        status: "IN_PROCESS" | "COMPLETE" | "INCOMPLETE" | "ERROR";
        errorMessage?: string;
    }[];
    get isDenied(): boolean;
    get isExpired(): boolean;
    get triggers(): {
        countdown: {
            days: number;
            hours: number;
            minutes: number;
            seconds: number;
        } | undefined;
        startedAt: Date | undefined;
        id: "LOGIN" | "CLICK_LINK" | "SAFEKEY_2FA" | "SMS" | "PHONE_CALL";
        requiresVerification: boolean;
        status: MainTriggerStatus;
        expiresAt: Date | undefined;
        target: string;
    }[];
    get pendingTrigger(): {
        countdown: {
            days: number;
            hours: number;
            minutes: number;
            seconds: number;
        } | undefined;
        startedAt: Date | undefined;
        id: "LOGIN" | "CLICK_LINK" | "SAFEKEY_2FA" | "SMS" | "PHONE_CALL";
        requiresVerification: boolean;
        status: MainTriggerStatus;
        expiresAt: Date | undefined;
        target: string;
    } | undefined;
    get isStarted(): boolean;
    get isCompleted(): boolean;
    get dataRevealed(): boolean;
    get hasPendingTrigger(): boolean;
    get revealedSecretData(): DataAsset[] | undefined;
    get remainingTimeForClose(): number | undefined;
    get timeoutMinutesForClose(): number | undefined;
    get pendingShare(): {
        id: string;
        status: "WAITING" | "COLLECTING" | "COLLECTED" | "RELEASED";
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    } | undefined;
    get pendingBeneficiary(): {
        firstName: string | undefined;
        lastName: string | undefined;
        types: any[];
        id: string;
        email: string | undefined;
    } | undefined;
    get mobileShares(): {
        id: string;
        status: "WAITING" | "COLLECTING" | "COLLECTED" | "RELEASED";
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    }[];
    get coldShares(): {
        id: string;
        status: "WAITING" | "COLLECTING" | "COLLECTED" | "RELEASED";
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    }[];
    get beneficiariesShares(): {
        id: string;
        status: "WAITING" | "COLLECTING" | "COLLECTED" | "RELEASED";
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    }[];
    get mergeAuthorityShare(): {
        id: string;
        status: "WAITING" | "COLLECTING" | "COLLECTED" | "RELEASED";
        type: ShareType;
        shareholder: {
            isMergeAuthority: boolean;
            details: {
                firstName: string | undefined;
                lastName: string | undefined;
                types: any[];
                id: string;
                email: string | undefined;
            };
            type: ShareType;
        } | undefined;
    } | undefined;
    toPrimitives(): PlanMergeProcessViewProps;
}

interface SharedProps extends Omit<PlanTriggerInput, 'id'> {
}
declare class TriggerBuilder {
    static clickLink(props: Omit<SharedProps, "settings"> & {
        email: string;
    }): PlanTriggerInput;
    static login(props: Omit<SharedProps, "settings"> & {
        email: string;
    }): PlanTriggerInput;
    static sms(props: Omit<SharedProps, "settings"> & {
        phone: string;
    }): PlanTriggerInput;
    static phoneCall(props: Omit<SharedProps, "settings"> & {
        phone: string;
    }): PlanTriggerInput;
}
declare class TriggerCountDownBuilder {
    static days(n: number): PlanTriggerInput["countdown"];
    static hours(n: number): PlanTriggerInput["countdown"];
    static minutes(n: number): PlanTriggerInput["countdown"];
    static create(input: Partial<PlanTriggerInput["countdown"]>): PlanTriggerInput["countdown"];
}

declare class PlanBeneficiaryBuilder {
    static skMobileBeneficiary(props: {
        details: SafeKeyMobileBeneficiary;
        isMergeAuthority: boolean;
    }): PlanBeneficiaryInput;
    static skProBeneficiary(props: {
        details: SafeKeyProBeneficiary;
        isMergeAuthority: boolean;
    }): PlanBeneficiaryInput;
}

declare class ProtectionPlanCode {
    private readonly value;
    private constructor();
    static create(code?: string): ProtectionPlanCode;
    toString(): string;
    equals(other: ProtectionPlanCode): boolean;
}

declare class ProtectionPlanId {
    private readonly value;
    private constructor();
    static create(id?: string): ProtectionPlanId;
    toString(): string;
    equals(other: ProtectionPlanId): boolean;
}

/**
 * @module Protection Plan
 */

declare class ProtectionPlanModule extends AppModule {
    private args;
    static readonly dependsOn: readonly ["core"];
    static readonly config?: CoreModuleConfig & ProtectionPlanModuleConfig;
    name: string;
    constructor(args: {
        deps?: {
            core: AppModule;
            safekey: AppModule;
        };
        config?: CoreModuleConfig & ProtectionPlanModuleConfig;
    });
    get providers(): (ProtectionPlanDataProvider | ProtectionPlanServiceProvider | PlanListingAndCreationUseCaseProvider | PlanConfigurationUseCaseProvider | PlanMergingUseCaseProvider)[];
}
type ProtectionPlanModuleConfig = {
    authTokens: {
        mergingProcessKey: string;
    };
};

declare function useGetPersonalProtectionPlan(filter: {
    id: string;
}, options?: QueryOptions): {
    error?: any;
    isIdle: boolean;
    loading: boolean;
    loaded: boolean;
    refetch: any;
    isFetching: boolean;
    isRefetching: boolean;
    data: ProtectionPlanSummary | undefined;
};

type ProtectionPlanFilters = {
    id: string;
} | {
    beneficiary: {
        code: string;
        email?: string;
    };
} | {
    beneficiary: {
        code?: string;
        email: string;
    };
};

declare function useFindPersonalProtectionPlanSummaryByCriteria(filter?: ProtectionPlanFilters, options?: QueryOptions): {
    total?: number | undefined;
    error?: any;
    loading: boolean;
    loaded: boolean;
    refetch: any;
    isFetching: boolean;
    isRefetching: boolean;
    isIdle?: boolean;
    data: unknown;
};

declare function usePersonalProtectionPlanListener(id: string, onUpdateReceived: (event: any) => any, options?: QueryOptions): {
    data?: ProtectionPlanSummary;
    loading?: boolean;
    error?: string;
};
declare function useProtectionPlanEventSubscriber(id: string, onEvent: (event: any) => void, options?: {
    enabled: boolean;
}): void;

declare function useCreatePersonalProtectionPlan(): {
    create: (props: ProtectionPlanInput) => Promise<any>;
    loading: boolean;
    data: string | undefined;
    error: any;
};

interface ProtectionPlanSecurityLevelRequestInput {
    planType: string;
    beneficiariesAmount: number;
    coldSharesAmount: number;
    mobileSharesAmount: number;
    authenticationMethodsAmount: number;
    mergeThreshold?: number;
}
declare function useGetPersonalProtectionPlanSecurityLevel(data: ProtectionPlanSecurityLevelRequestInput, options?: QueryOptions): {
    error?: any;
    isIdle: boolean;
    loading: boolean;
    loaded: boolean;
    refetch: any;
    isFetching: boolean;
    isRefetching: boolean;
    data?: {
        index: number;
        rating: string;
        evaluation: {
            beneficiariesAmount: number;
            recoverySharesRatio: number;
            mergeThresholdRatio: number;
            coldSharesAmount: number;
            mobileSharesAmount: number;
            mobileSharesVsColdSharesRatio: number;
            authenticationMethodsAmount: number;
            amountOfLayers: number;
        };
    };
};

interface StartConfigurationInput {
    planId: string;
    dataAssets: DataAsset[];
}

interface PlanColdShareData {
    devicePin?: string;
    planId: string;
    shareId: string;
    shareData: DeviceShareInfo;
}
type ColdScanFilters = {
    planId?: string;
    shareId?: string;
    isMergeAuthority?: boolean;
};
type DeviceInfo = {
    appId: string;
    appPassword: string;
    name?: string;
    serialId?: string;
    version?: string;
    pin?: string;
    freeSlots?: number;
    totalSlots: number;
};
type IOResponse = {
    operationType: string;
    io?: {
        progress: number;
        total: number;
    };
    loginAttempts?: {
        total: number;
        countdown: number;
        progress: number;
    };
};
type OperationProgressCallback = (params: IOResponse) => any;
interface ColdStorageService {
    getDeviceInfo(context?: {
        id: string;
    }): Promise<Omit<DeviceInfo, 'appPassword'> | undefined>;
    insert(id: string): Promise<void>;
    connect(context: {
        id?: string;
        pin: string;
    }): Promise<void>;
    touch(context: {
        id?: string;
        pin: string;
    }, onIOCallback?: OperationProgressCallback): Promise<void>;
    disconnect(): Promise<void>;
    getDeviceId(): Promise<string | undefined>;
    getDevicePassword(): Promise<string | undefined>;
    distributeShare(data: PlanColdShareData, onIOCallback?: OperationProgressCallback): Promise<void>;
    collectShare(validatorPin: string, filters: ColdScanFilters, onIOCallback?: OperationProgressCallback): Promise<any>;
    collectAllSharesPlansIds(validatorPin: string, onIOCallback?: OperationProgressCallback): Promise<string[]>;
    collectAllPlanShares(validatorPin: string, onIOCallback?: OperationProgressCallback): Promise<DeviceShareInfo[]>;
}

interface SafekeyDeviceInfo {
    freeSlots?: number;
    totalSlots: number;
    usagePercentage: number;
}
interface SafekeyDeviceCallbacks {
    onTouchRequired?: () => void;
    onProgress?: (io: IOResponse) => void;
    onDeviceInfo?: (info: SafekeyDeviceInfo) => void;
}
declare class SafekeyDeviceUseCase {
    private coldStorage;
    private _pin;
    constructor(coldStorage: ColdStorageService);
    connect(pin: string, callbacks?: SafekeyDeviceCallbacks): Promise<SafekeyDeviceInfo>;
    disconnect(): Promise<void>;
    getDeviceInfo(): Promise<SafekeyDeviceInfo | undefined>;
    getDeviceId(): Promise<string | undefined>;
    getDevicePassword(): Promise<string | undefined>;
    collectShare(pin: string, filters: ColdScanFilters, onProgress?: OperationProgressCallback): Promise<any>;
    collectAllSharesPlansIds(pin: string, onProgress?: OperationProgressCallback): Promise<string[]>;
    collectAllPlanShares(pin: string, onProgress?: OperationProgressCallback): Promise<DeviceShareInfo[]>;
    distributeShare(data: PlanColdShareData, onProgress?: OperationProgressCallback): Promise<void>;
    private fetchDeviceInfo;
    private buildDeviceInfo;
}

type ColdDistributionStep = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'WRITING_DATA' | 'CONNECT_ERROR' | 'ERROR';

type StartConfigurationProcessProps = Omit<StartConfigurationInput, 'planId'>;
type UsePlanConfigurationProcessReturn = ReturnType<typeof useConfigurePersonalProtectionPlan>;
type ColdStep$1 = ColdDistributionStep | 'SUCCESS';
declare function useConfigurePersonalProtectionPlan(planId?: string): {
    start: {
        execute: (props: StartConfigurationProcessProps) => Promise<void>;
        error: string | undefined;
        loading: boolean;
    };
    coldShareDistribution: {
        writeCurrentBeneficiaryShare: {
            execute: (devicePin: string) => Promise<void>;
            progress: number | undefined;
            error: string | undefined;
            connectDeviceTimeout: number | undefined;
            status: ColdStep$1;
        };
    };
    currentStep: {
        retry: {
            execute: () => Promise<void>;
        };
    };
    process: PlanConfigurationProcessView;
    error: string | undefined;
};

declare function useGetPlanConfigurationProcess(id: string, options?: QueryOptions): {
    data?: any;
    total?: number;
    error?: any;
    isIdle: boolean;
    loading: boolean;
    loaded: boolean;
    refetch: any;
    isFetching: boolean;
    isRefetching: boolean;
};

declare function useDeletePlanConfigurationProcess(): {
    delete: (id: string) => Promise<any>;
    reset: () => any;
    loading: boolean;
    loaded: boolean;
    data: null;
    error: any;
};

type MergeProcessFilterCriteria = {
    expired?: boolean;
    old?: boolean;
    planId?: string;
};

type PresentBeneficiaryInput = {
    id?: string;
    email?: string;
    code?: string;
    deviceId?: string;
};
interface StartMergeProcessInput {
    id?: string;
    planId: string;
    presentBeneficiaries: PresentBeneficiaryInput[];
    useBackupShares?: boolean;
}

type CollectColdShareStep = 'CONNECT_DEVICE' | 'CONNECTING_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'COLLECTING_DATA' | 'SUCCESS';

type UsePlanMergeProcessReturn = ReturnType<typeof useMergePersonalProtectionPlan>;
interface RevealConfiguration {
    revealOptions?: {
        timeoutMinutes: number;
    };
    /** @default true */
    autoReveal?: boolean;
}
interface UsePlanMergeProcessConfig {
    reveal?: RevealConfiguration;
}
type ColdStep = CollectColdShareStep | 'SUCCESS';
declare function useMergePersonalProtectionPlan(planId?: string, config?: UsePlanMergeProcessConfig): {
    start: {
        execute: (props: Omit<StartMergeProcessInput, "planId">) => Promise<void>;
        loading: boolean;
        error: string | undefined;
    };
    abort: {
        execute: () => Promise<void>;
        loading: boolean;
        error: string | undefined;
    };
    close: {
        execute: () => Promise<void>;
        loading: boolean;
        error: string | undefined;
    };
    coldShareCollection: {
        writeCurrentBeneficiaryShare: {
            execute: (devicePin: string) => Promise<void>;
            progress: number | undefined;
            error: string | undefined;
            connectDeviceTimeout: number | undefined;
            status: ColdStep;
        };
    };
    currentTrigger: {
        validate: {
            execute: ({ code }: {
                code: string;
            }) => Promise<void>;
            error: string | undefined;
            loading: boolean;
        };
        retry: {
            execute: () => Promise<void>;
            error: string | undefined;
            loading: boolean;
        };
    };
    currentStep: {
        retry: {
            execute: () => Promise<void>;
        };
    };
    reveal: {
        trigger: (options?: RevealOptions) => void;
        isAvailableToReveal: boolean;
        options: {
            id: number;
            name: string;
        }[];
    };
    process: any;
    loading: boolean;
    isRevealing: boolean;
    error: string | undefined;
};

declare const REVEAL_OPTIONS: {
    id: number;
    name: string;
}[];

type BeneficiaryIdentity = OnlyOne<{
    id: string;
    email: string;
    code: string;
}>;
declare function useMergePersonalPlanBeneficiarySelection({ plan, initialMergeAuthorityEmail }: {
    plan?: ProtectionPlanSummary;
    initialMergeAuthorityEmail?: string;
}): {
    selection: {
        count: number;
        max: number;
    };
    isBeneficiarySelected: (beneficiary: BeneficiaryIdentity) => boolean;
    canUseRecoveryShares: boolean;
    useRecoveryShares: boolean;
    toggleUseRecoveryShares: (value: boolean) => void;
    selectedBeneficiaries: BeneficiaryIdentity[];
    selectedMergeAuthority: BeneficiaryIdentity | undefined;
    toggleSelectBeneficiary: (beneficiary: BeneficiaryIdentity) => void;
};

declare function useDeleteMergingProcess({ onSuccess }: {
    onSuccess: any;
}): {
    delete: (id: string) => Promise<any>;
    reset: () => any;
    loading: boolean;
    loaded: boolean;
    data: null;
    error: any;
};

declare function useDeleteMergingProcessByCriteria({ onSuccess }: {
    onSuccess?: any;
}): {
    remove: (criteria: MergeProcessFilterCriteria) => Promise<any>;
    reset: () => any;
    loading: boolean;
    loaded: boolean;
    data: any;
    error: any;
};

interface Countdown {
    days: number;
    hours: number;
    minutes: number;
    seconds: number;
}
declare function useTriggerCountDown({ startedAt, countdownConfiguration, onTimeout, options }: {
    startedAt?: Date;
    onTimeout?: any;
    countdownConfiguration: Countdown;
    options?: {
        enabled?: boolean;
    };
}): {
    value: Countdown;
    formatedValue: string;
};

declare function useCountDown(initialValue: any, onTimeout: any, options: {
    enabled: boolean;
    interval: number;
}): {
    value: number;
    formatedValue: string;
};

type AuthorizeColdDeviceResult = {
    deviceId: string;
};

type AuthorizeState = 'IDLE' | 'CONNECTING' | 'TOUCH_DEVICE_BUTTON' | 'AUTHORIZING' | 'SUCCESS' | 'ERROR';
declare function useAuthorizeMergeAuthorityColdDevice(): {
    authorize(devicePin: string): Promise<void>;
    authorization: AuthorizeColdDeviceResult | undefined;
    state: AuthorizeState;
    connectDeviceTimeout: number | undefined;
    error: string | undefined;
};

type MobileDeviceAuthorization = {
    deviceId: string;
    devicePassword: string;
};

type MOBILE_AUTH_STATE = 'READ' | 'LOADING' | 'ERROR' | 'SUCCESS';
declare function useAuthorizeMergeAuthorityMobileDevice(props?: {
    options?: {
        enabled: boolean;
    };
}): {
    requestNewToken: () => Promise<void>;
    authorization: MobileDeviceAuthorization | undefined;
    state: MOBILE_AUTH_STATE;
    loading: boolean;
    token: string | null;
    requestTimeoutPercentage: number;
};

type SCAN_STATE = 'SCANNING' | 'FOUND_PLANS' | 'ERROR';
declare function useDetectMergeAuthorityPlans(): {
    detect(): Promise<void>;
    data: ProtectionPlanSummary[];
    state: SCAN_STATE | undefined;
    error: string | undefined;
    loading: boolean;
};

declare function useGetMergeAuthorityProtectionPlan(id: string, options?: QueryOptions): {
    error?: any;
    isIdle: boolean;
    loading: boolean;
    loaded: boolean;
    refetch: any;
    isFetching: boolean;
    isRefetching: boolean;
    data?: PersonalProtectionPlan | undefined;
};

declare class SafekeyServiceProvider implements AppProvider {
    private deps;
    constructor(deps: {
        core: AppModule;
    });
    get type(): string;
    services(params?: any): Record<string, InstanceType<any>>;
}

declare class SafekeyUseCaseProvider implements AppProvider {
    private module;
    constructor(module: AppModule);
    get type(): "service";
    services(): Record<string, any>;
}

interface SafekeyMigrationRepository {
    findPlanLegacyId(planId: string): Promise<string | undefined>;
}

declare class SafekeyModule extends AppModule {
    private args;
    static readonly dependsOn: readonly ["core"];
    name: string;
    constructor(args: {
        deps: {
            core: AppModule;
        };
        config: any;
    });
    get providers(): (SafekeyServiceProvider | SafekeyUseCaseProvider)[];
}

type SafekeyDeviceState = 'CONNECT_DEVICE' | 'TOUCH_DEVICE_BUTTON' | 'ERROR' | 'SUCCESS';
declare function useSafekeyDevice(): {
    connect: (pin: string) => Promise<void>;
    disconnect: () => Promise<void>;
    disconnecting: boolean;
    write: (data: Parameters<SafekeyDeviceUseCase["distributeShare"]>[0], onProgress?: Parameters<SafekeyDeviceUseCase["distributeShare"]>[1]) => Promise<void>;
    getDeviceId: () => Promise<string | undefined>;
    collectShare: (pin: string, filters: ColdScanFilters) => Promise<DeviceShareInfo | undefined>;
    collectAllPlanShares: (pin: string) => Promise<ReturnType<SafekeyDeviceUseCase["collectAllPlanShares"]>>;
    state: SafekeyDeviceState;
    error: string | undefined;
    loginAttempts: {
        count: number;
        total: number;
    };
    pinValidationTimeout: number | undefined;
    device: SafekeyDeviceInfo | undefined;
};

declare function useGetConnectedDeviceInfo(options?: QueryOptions): any;

declare function useScanPlansFromDevice(): {
    findPlanIds(devicePin: string): Promise<void>;
    ids: string[];
    data: never[];
    ioResponse: IOResponse | undefined;
    loading: boolean;
};

export { Beneficiary, DataAssetBuilder, DataAssetDefinitionService, DataAssetInputValidator, DataAssetManager, DataAssetMediaFileValidator, PersonalProtectionPlan, PlanBeneficiaryBuilder, PlanConfigurationProcessView, PlanMergeProcessView, ProtectionPlanCode, ProtectionPlanId, ProtectionPlanModule, ProtectionPlanSummary, REVEAL_OPTIONS, SafekeyDeviceUseCase, SafekeyModule, TriggerBuilder, TriggerCountDownBuilder, useAuthorizeMergeAuthorityColdDevice, useAuthorizeMergeAuthorityMobileDevice, useConfigurePersonalProtectionPlan, useCountDown, useCreatePersonalProtectionPlan, useDeleteMergingProcess, useDeleteMergingProcessByCriteria, useDeletePlanConfigurationProcess, useDetectMergeAuthorityPlans, useFindPersonalProtectionPlanSummaryByCriteria, useGetConnectedDeviceInfo, useGetMergeAuthorityProtectionPlan, useGetPersonalProtectionPlan, useGetPersonalProtectionPlanSecurityLevel, useGetPlanConfigurationProcess, useMergePersonalProtectionPlan, useMergePersonalPlanBeneficiarySelection as useMergePlanBeneficiariesSelection, usePersonalProtectionPlanListener, useProtectionPlanEventSubscriber, useSafekeyDevice, useScanPlansFromDevice, useTriggerCountDown, validateDataAssetMediaFile };
export type { ApiKeyAsset, BaseDeviceShareInfo, ColdScanFilters, ColdStorageService, ConfigurationStatus, CustodianDeviceShareInfo, DataAsset, DataAssetCategoryCoreDef, DataAssetCategoryId, DataAssetCoreDef, DataAssetMediaType, DataAssetShareProps, DataAssetType, DeviceInfo, DeviceShareInfo, IOResponse, MediaAsset, MergeProcessBuildState, MergeStatus, OperationProgressCallback, PINCodeAsset, PaymentCreditCardAsset, PaymentDebitCardAsset, PersonalDeviceShareInfo, PlainTextAsset, PlanBeneficiaryInput, PlanBeneficiaryRelationView, PlanBeneficiaryView, PlanColdShareData, PlanConfigurationProcessViewProps, PlanDetailsInput, PlanOwnerInput, PlanShareView, PlanSharesConfigurationInput, PlanStorageConfigurationInput, PlanStorageLayer, PlanTriggerInput, PlanTriggerView, PrivateKeyAsset, ProtectionPlanInput, ProtectionPlanModuleConfig, ProtectionPlanSummaryProps, RecoveryCodeAsset, RevealConfiguration, SafekeyDeviceCallbacks, SafekeyDeviceInfo, SafekeyMigrationRepository, SecretData, SeedPhraseAsset, ShareholderView, UsePlanConfigurationProcessReturn, UsePlanMergeProcessConfig, UsePlanMergeProcessReturn, UserAndPasswordAsset, ValidateDataAssetMediaFileInput, ValidatedDataAssetMediaFile };
