import { Widget, FormValue } from '@truvity/widget__forms'; import { VcPreview, CredentialDid, ViewWidgetErrors, WalletDid, EntityDid, WidgetViewApi } from '../../types'; import { ReadonlyFileApi } from './apiFilesStorage'; export declare type Preview = string; export declare type Credential = { Preview: Preview; VcDid: CredentialDid; }; export declare type Credentials = Credential[]; export declare type LinkedCredentialsPreviewRequests = { /** * A handler that resolves a DID of the linked credential to a human-readable preview. */ getVcPreview: (credentialDid: CredentialDid) => Promise; }; export declare type LinkedCredentialsSuggestRequests = { /** * A handler that returns linked credential suggestions based on the JSON Schema IDs configured for the field * and existing claim values that can be used for conditional logic. */ suggestVc: (schemaIds: string[], claimValues: FormValue) => Promise; }; export declare type LinkedCredentialsApi = LinkedCredentialsPreviewRequests & LinkedCredentialsSuggestRequests & { /** * Widget API client. Can be customized for tests. */ widgetApi: WidgetViewApi; /** * Wallet API client. Can be customized for tests. */ walletApi: ReadonlyFileApi; }; export declare type LinkedCredentialsWidgetOptions = LinkedCredentialsApi & { walletDid: WalletDid; entityDid: EntityDid; onError?: (error: ViewWidgetErrors) => void; }; export declare class LinkedCredentialsWidget extends Widget { private options; constructor(options: LinkedCredentialsWidgetOptions); protected handleErrors(error: any): void; protected handleCredentialErrors(credentialId: CredentialDid, error: any): void; protected getCredentialPreview(id: string): Promise; protected suggestCredentials(type: string[]): Promise; getFieldApi(): { options: LinkedCredentialsWidgetOptions; getCredentialPreview: (id: string) => Promise; suggestCredentials: (type: string[]) => Promise; }; } //# sourceMappingURL=linkedCredentials.d.ts.map