import { AnonCredsCredentialInfo, AnonCredsCredentialsForProofRequest, AnonCredsProofFormat, AnonCredsProofFormatService, AnonCredsProofRequestRestriction, AnonCredsRequestedAttributeMatch, AnonCredsRequestedPredicateMatch, LegacyIndyProofFormat, LegacyIndyProofFormatService } from '@aries-framework/anoncreds';
import { Agent, ConnectionRecord, CredentialExchangeRecord, BasicMessageRecord, ProofExchangeRecord } from '@aries-framework/core';
import { GetCredentialsForRequestReturn, ProofFormatDataMessagePayload } from '@aries-framework/core/build/modules/proofs/protocol/ProofProtocolOptions';
import { Predicate } from '@hyperledger/aries-oca/build/legacy';
import { ParsedUrl } from 'query-string';
import { ReactNode } from 'react';
import { TFunction } from 'react-i18next';
import { Role } from '../types/chat';
import { ProofCredentialAttributes, ProofCredentialItems, ProofCredentialPredicates } from '../types/proof-items';
import { ChildFn } from '../types/tour';
export { parsedCredDefNameFromCredential } from './cred-def';
import { BifoldAgent } from './agent';
export { parsedCredDefName } from './cred-def';
export { parsedSchema } from './schema';
export declare enum Orientation {
    Landscape = "landscape",
    Portrait = "portrait"
}
export declare const orientation: (width: number, height: number) => Orientation;
export declare const isTablet: (width: number, height: number) => boolean;
/**
 * Generates a numerical hash based on a given string
 * @see https://stackoverflow.com/questions/3426404/create-a-hexadecimal-colour-based-on-a-string-with-javascript
 * @param { string } s given string
 * @returns { number } numerical hash value
 */
export declare const hashCode: (s: string) => number;
/**
 * Converts a numerical hash into a hexidecimal color string
 * @see https://helderesteves.com/generating-random-colors-js/#Generating_random_dark_colors
 * @param { number } hash numerical hash value (generated by hashCode function above)
 * @returns { string } hexidecimal string eg. #32d3cc
 */
export declare const hashToRGBA: (hash: number) => string;
/**
 *
 * @param time
 * @param params see below
 * shortMonth: whether to use Jun in place of June, Mar in place of March for example (overridden by `format`)
 * format: an optional custom moment format string to create the formatted date from
 * includeHour: whether to add the hour and minute and am/pm. eg 9:32 pm (overridden by `chatFormat` and `trim`)
 * chatFormat: whether to style the date to appear like a chat message timestamp eg. '7 minutes ago' or 'Just now'
 * trim: if true, if it's the same day the date will be trimmed to just the hour, if it's the same year then the year will be trimmed from the date
 * eg. if the current year is 2023, February 12, 2023 will be trimmed to February 12
 * @returns formatted time string
 */
export declare function formatTime(time: Date, params?: {
    shortMonth?: boolean;
    format?: string;
    includeHour?: boolean;
    chatFormat?: boolean;
    trim?: boolean;
}): string;
export declare function formatIfDate(format: string | undefined, value: string | number | null): string | number | null;
/**
 * @deprecated The function should not be used
 */
export declare function connectionRecordFromId(connectionId?: string): ConnectionRecord | void;
export declare function getConnectionName(connection: ConnectionRecord | undefined, alternateContactNames: Record<string, string>): string;
export declare function getCredentialConnectionLabel(credential?: CredentialExchangeRecord): string;
export declare function getConnectionImageUrl(connectionId: string): string | undefined;
export declare function firstValidCredential(fields: AnonCredsRequestedAttributeMatch[] | AnonCredsRequestedPredicateMatch[], revoked?: boolean): AnonCredsRequestedAttributeMatch | AnonCredsRequestedPredicateMatch | null;
export declare const getOobDeepLink: (url: string, agent: Agent | undefined) => Promise<any>;
/**
 * A sorting function for the Array `sort()` function
 * @param a First retrieved credential
 * @param b Second retrieved credential
 */
export declare const credentialSortFn: (a: any, b: any) => number;
export declare const isDataUrl: (value: string | number | null) => boolean;
export type Fields = Record<string, AnonCredsRequestedAttributeMatch[] | AnonCredsRequestedPredicateMatch[]>;
/**
 * Retrieve current credentials info filtered by `credentialDefinitionId` if given.
 * @param credDefId Credential Definition Id
 * @returns Array of `AnonCredsCredentialInfo`
 */
export declare const getCredentialInfo: (credId: string, fields: Fields) => AnonCredsCredentialInfo[];
/**
 * Given proof credential items, evaluate and return its predicates, setting `satisfied` property.
 * @param proofCredentialsItems
 * @returns Array of evaluated predicates
 */
export declare const evaluatePredicates: (fields: Fields, credId?: string) => (proofCredentialItems: ProofCredentialItems) => Predicate[];
export declare const processProofAttributes: (request?: ProofFormatDataMessagePayload<[LegacyIndyProofFormat, AnonCredsProofFormat], 'request'> | undefined, credentials?: GetCredentialsForRequestReturn<[LegacyIndyProofFormatService, AnonCredsProofFormatService]>, credentialRecords?: CredentialExchangeRecord[]) => {
    [key: string]: ProofCredentialAttributes;
};
export declare const mergeAttributesAndPredicates: (attributes: {
    [key: string]: ProofCredentialAttributes;
}, predicates: {
    [key: string]: ProofCredentialPredicates;
}) => {
    [key: string]: ProofCredentialAttributes & ProofCredentialPredicates;
};
export declare const processProofPredicates: (request?: ProofFormatDataMessagePayload<[LegacyIndyProofFormat, AnonCredsProofFormat], 'request'> | undefined, credentials?: GetCredentialsForRequestReturn<[LegacyIndyProofFormatService, AnonCredsProofFormatService]>, credentialRecords?: CredentialExchangeRecord[]) => {
    [key: string]: ProofCredentialPredicates;
};
export declare const retrieveCredentialsForProof: (agent: BifoldAgent, proof: ProofExchangeRecord, fullCredentials: CredentialExchangeRecord[], t: TFunction<'translation', undefined>) => Promise<{
    groupedProof: (ProofCredentialAttributes & ProofCredentialPredicates)[];
    retrievedCredentials: AnonCredsCredentialsForProofRequest | undefined;
    fullCredentials: CredentialExchangeRecord[];
} | undefined>;
export declare const pTypeToText: (item: Predicate, t: TFunction<'translation', undefined>, attributeTypes?: Record<string, string>) => {
    pValue: string | number | null;
    pType: string;
    parameterizable?: boolean | undefined;
    satisfied?: boolean | undefined;
    name: string | null;
    format?: string | undefined;
    type?: string | undefined;
    encoding?: string | undefined;
    mimeType?: string | undefined;
    revoked?: boolean | undefined;
    credentialId?: string | undefined;
    label?: string | undefined;
    restrictions?: AnonCredsProofRequestRestriction[] | undefined;
    nonRevoked?: import("@aries-framework/anoncreds").AnonCredsNonRevokedInterval | undefined;
};
/**
 * @deprecated The function should not be used
 */
export declare const sortCredentialsForAutoSelect: (credentials: AnonCredsCredentialsForProofRequest) => AnonCredsCredentialsForProofRequest;
/**
 *
 * @param url a redirection URL to retrieve a payload for an invite
 * @param agent an Agent instance
 * @returns payload from following the redirection
 */
export declare const receiveMessageFromUrlRedirect: (url: string, agent: Agent | undefined) => Promise<any>;
/**
 *
 * @param url a redirection URL to retrieve a payload for an invite
 * @param agent an Agent instance
 * @returns payload from following the redirection
 */
export declare const receiveMessageFromDeepLink: (url: string, agent: Agent | undefined) => Promise<any>;
/**
 *
 * @param uri a URI containing a base64 encoded connection invite in the query parameter
 * @param agent an Agent instance
 * @returns a connection record from parsing and receiving the invitation
 */
export declare const connectFromInvitation: (uri: string, agent: Agent | undefined, implicitInvitations?: boolean, reuseConnection?: boolean) => Promise<{
    outOfBandRecord: import("@aries-framework/core").OutOfBandRecord;
    connectionRecord?: ConnectionRecord | undefined;
} | undefined>;
/**
 * Create a new connection invitation
 *
 * @param agent an Agent instance
 * @param goalCode add goalCode to connection invitation
 * @returns a connection record
 */
export declare const createConnectionInvitation: (agent: Agent | undefined, goalCode?: string) => Promise<{
    record: import("@aries-framework/core").OutOfBandRecord;
    invitation: import("@aries-framework/core").OutOfBandInvitation;
    invitationUrl: string;
}>;
/**
 * Create a new connection invitation with a goal code specifying that it will be deleted after issuing or verifying once depending on type
 *
 * @param agent an Agent instance
 * @param type add goalCode to connection invitation
 * @returns a connection record
 */
export declare const createTempConnectionInvitation: (agent: Agent | undefined, type: 'issue' | 'verify') => Promise<{
    record: import("@aries-framework/core").OutOfBandRecord;
    invitation: import("@aries-framework/core").OutOfBandInvitation;
    invitationUrl: string;
}>;
/**
 * Parse URL from provided string
 * @param urlString string to parse
 * @returns ParsedUur object if success or undefined
 */
export declare const getUrl: (urlString: string) => ParsedUrl | undefined;
/**
 * Parse JSON from provided string
 * @param jsonString string to parse
 * @returns JSON object if success or undefined
 */
export declare const getJson: (jsonString: string) => Record<string, unknown> | undefined;
/**
 * Typeguard to check if any React children is represented as a function
 * instead of a Node. I,e., when it's a {@link ChildFn}.
 *
 * @param children any React children
 * @returns true if the children is a function, false otherwise
 */
export declare function isChildFunction<T>(children: ReactNode | ChildFn<T>): children is ChildFn<T>;
export declare function getCredentialEventRole(record: CredentialExchangeRecord): Role;
export declare function getCredentialEventLabel(record: CredentialExchangeRecord): "" | "Chat.CredentialProposalSent" | "Chat.CredentialOfferReceived" | "Chat.CredentialRequestSent" | "Chat.CredentialDeclined" | "Chat.CredentialReceived";
export declare function getProofEventRole(record: ProofExchangeRecord): Role;
export declare function getProofEventLabel(record: ProofExchangeRecord): "" | "Chat.ProofRequestSent" | "Chat.ProofPresentationReceived" | "Chat.ProofRequestReceived" | "Chat.ProofRequestSatisfied" | "Chat.ProofRequestRejected" | "Chat.ProofRequestRejectReceived";
export declare function getMessageEventRole(record: BasicMessageRecord): Role;
export declare function generateRandomWalletName(): string;
//# sourceMappingURL=helpers.d.ts.map