import { CruxId } from "../../packages/identity-utils";
import { IKeyManager } from "../interfaces";
import { CruxDomain, IGlobalAsset, IGlobalAssetList } from "./crux-domain";
export interface IAddress {
    addressHash: string;
    secIdentifier?: string;
}
export interface IAddressMapping {
    [currency: string]: IAddress;
}
export interface ICruxUserRegistrationStatus {
    status: SubdomainRegistrationStatus;
    statusDetail: SubdomainRegistrationStatusDetail;
}
export interface ICruxUserInformation {
    registrationStatus: ICruxUserRegistrationStatus;
    transactionHash?: string;
    ownerAddress?: string;
}
export interface ICruxUserData {
    configuration: ICruxUserConfiguration;
    privateAddresses: ICruxUserPrivateAddresses;
}
export interface ICruxUserConfiguration {
    enabledAssetGroups: string[];
}
export interface ICruxUserPrivateAddresses {
    [sharedSecretHash: string]: string;
}
export declare enum SubdomainRegistrationStatus {
    NONE = "NONE",
    PENDING = "PENDING",
    DONE = "DONE",
    REJECT = "REJECT"
}
export declare enum SubdomainRegistrationStatusDetail {
    NONE = "Subdomain not registered with this registrar.",
    PENDING_REGISTRAR = "Subdomain registration pending on registrar.",
    PENDING_BLOCKCHAIN = "Subdomain registration pending on blockchain.",
    DONE = "Subdomain propagated."
}
export declare class CruxUser {
    private pubKey?;
    private cruxUserInformation;
    private cruxUserID;
    private addressMap;
    private cruxUserConfig;
    private cruxUserPrivateAddresses;
    private cruxDomain;
    constructor(cruxUserSubdomain: string, cruxDomain: CruxDomain, addressMap: IAddressMapping, cruxUserInformation: ICruxUserInformation, cruxUserData: ICruxUserData, publicKey?: string);
    readonly cruxID: CruxId;
    readonly domain: CruxDomain;
    readonly info: ICruxUserInformation;
    readonly config: ICruxUserConfiguration;
    readonly publicKey: string | undefined;
    readonly privateAddresses: ICruxUserPrivateAddresses;
    setSupportedAssetGroups: () => void;
    getAddressMap(): IAddressMapping;
    setAddressMap(addressMap: IAddressMapping): void;
    setPrivateAddressMap: (cruxUser: CruxUser, addressMap: IAddressMapping, keyManager: IKeyManager) => Promise<void>;
    getAddressFromAsset: (asset: IGlobalAsset, keyManager?: IKeyManager | undefined) => Promise<IAddress | undefined>;
    getAddressFromAssetMatcher: (assetMatcher: IAssetMatcher, keyManager?: IKeyManager | undefined) => Promise<IAddress | undefined>;
    private getDecryptedAddressMap;
    private setCruxDomain;
    private setCruxUserID;
    private setCruxUserInformation;
    private setCruxUserConfig;
    private setPublicKey;
    private setCruxUserPrivateAddresses;
}
export interface IAssetMatcher {
    assetGroup: string;
    assetIdentifierValue?: string | number;
}
export declare class CruxUserAddressResolver {
    private userAddressMap;
    private userClientAssetList;
    private userConfig;
    constructor(cruxUserAddressMap: IAddressMapping, cruxUserClientAssetList: IGlobalAssetList, cruxUserConfig: ICruxUserConfiguration);
    resolveAddressWithAsset: (asset: IGlobalAsset) => IAddress | undefined;
    resolveAddressWithAssetMatcher: (assetMatcher: IAssetMatcher) => IAddress | undefined;
    private findAssetWithAssetMatcher;
    private resolveFallbackAddressIfEnabled;
    private assetToAssetGroup;
}
