import { NotVault } from './notvault'; import { FileEntry, Files } from './files'; export declare const proofConfig: { [key: string]: { text: number; numbers: number; }; }; export type Schema = { id: string; type: string; fields: { id: string; name: string; type: "string" | "number" | "date"; decimals?: number; }[]; }; export type EncodedData = { schema: Schema; data: any[]; code: number[]; constraint_upper: any[]; constraint_lower: any[]; }; export type Credential = { schema: Schema; confidential?: { issuer: string; owner: string; }; id: string; hash: string; source: string; }; export type Proof = { query: Record; schema: Schema; proof: { proof: string; solidityProof: string; inputs: string[]; }; signature: string; }; export declare class Credentials { vault: NotVault; files?: Files; constructor(vault: NotVault, files?: Files); issue: (rawData: Record, schema: { id?: string; type?: string; data?: Schema; }, owner?: string, source?: string, chainMeta?: { read: boolean; write: boolean; }) => Promise; prove: (query: Record, salt: string, rawData: Record, schema: Schema) => Promise; verify: (rawData: Record, salt: string, proof: Proof, signer?: string) => Promise; list: () => Promise; add: (filename: string, dataB64: string, onUploadProgress?: any) => Promise; remove: (cid: string) => Promise; } export declare const unflattenObject: (flatObj: Record) => Record; export declare const flattenObject: (obj: Record, queryFlag: boolean) => Record; /** * Splits a string into an array of short strings (felts). A Cairo short string (felt) represents up to 31 utf-8 characters. * @param {string} str - The string to convert * @returns {bigint[]} - The string converted as an array of short strings as felts */ export declare const strToFeltArr: (str: string) => BigInt[]; /** * Converts an array of utf-8 numerical short strings into a readable string * @param {bigint[]} felts - The array of encoded short strings * @returns {string} - The readable string */ export declare const feltArrToStr: (felts: bigint[]) => string; export declare const strToNumber: (str: string) => BigInt;