import type { IcaBundleResponseEntry, IcaJwk, IcaLegalRepresentativeCredential, IcaLegalRepresentativeCredentialSubject, IcaOrganizationControllerCredential, IcaOrganizationControllerCredentialSubject, IcaVerifyTermsResponse } from './types.js'; /** * Canonical representative/controller binding projection extracted from an ICA * `LegalRepresentativeCredential`. * * Contract summary: * - `sameAs` expresses public identity continuity, typically an email-derived * `urn:multibase:z...` * - `material` expresses controller key continuity, preferably an RFC 9278 * JWK-thumbprint URN */ export interface IcaRepresentativeBindingProjection { sameAs?: string; material?: string; } /** Binding projection for one independently issued controller service VC. */ export interface IcaOrganizationControllerBindingProjection { sameAs?: string; material?: string; /** Controller authority codes such as the HL7-derived `RESPRSN`. */ roleCodes: string[]; /** Professional occupations such as `ISCO-08|1330`. */ occupationCodes: string[]; } /** * Normalizes a controller public alias into the exact same canonical form used * by ICA for `controller.sameAs` and `credentialSubject.sameAs`. * * Typical conversions: * - plain email -> `urn:multibase:z...` * - bare `z...` -> `urn:multibase:z...` * - already-normalized values remain stable * * @param input Raw controller alias supplied by frontend/BFF code. * @returns ICA-compatible canonical alias or `undefined` when empty. */ export declare function normalizeControllerSameAs(input: string | undefined): string | undefined; /** * Builds the canonical controller credential material identifier used by ICA * for `credentialSubject.hasCredential.material`. * * Preferred result: * - RFC 9278 JWK-thumbprint URN derived from the public JWK * * Fallback: * - `kid` when the provided JWK does not expose enough public parameters to * derive an RFC 7638 thumbprint * * @param publicJwk Controller public signing/binding JWK. * @returns Stable material identifier or `undefined` when no usable JWK data exists. */ export declare function buildControllerCredentialMaterial(publicJwk: IcaJwk | undefined): string | undefined; /** * Finds the representative credential entry inside an ICA `_verify-response` * DIDComm bundle. * * The helper is intentionally tolerant to current ICA naming variants: * - `LegalRepresentative-verification-v1.0` * - entries whose `type` includes `personcredential` * * @param response Parsed DIDComm bundle returned by ICA. * @returns Matching bundle entry or `undefined` when no representative VC exists. */ export declare function findLegalRepresentativeCredentialEntry(response: IcaVerifyTermsResponse): IcaBundleResponseEntry | undefined; /** * Extracts the representative credential subject from an ICA `_verify-response` * bundle. * * @param response Parsed DIDComm bundle returned by ICA. * @returns Representative credential subject or `undefined` when absent. */ export declare function getLegalRepresentativeCredentialSubject(response: IcaVerifyTermsResponse): IcaLegalRepresentativeCredentialSubject | undefined; /** * Reads the representative binding projection (`sameAs` + key material) from an * ICA `_verify-response` bundle. * * This helper is intentionally read-only. It does not try to "fix" missing * fields; it only exposes what ICA actually emitted for the representative VC. * * @param response Parsed DIDComm bundle returned by ICA. * @returns Binding projection with any emitted fields. */ export declare function extractRepresentativeBindingProjection(response: IcaVerifyTermsResponse): IcaRepresentativeBindingProjection; /** * Finds every organization-controller credential entry in an ICA * `_verify-response`. A legal-representative entry is never used as fallback. * * @param response Parsed DIDComm bundle returned by ICA. */ export declare function findOrganizationControllerCredentialEntries(response: IcaVerifyTermsResponse): Array>; /** Canonical name for finding ICA-issued service-controller entries. */ export declare const findServiceControllerCredentialEntries: typeof findOrganizationControllerCredentialEntries; /** * Extracts all controller service subjects from an ICA `_verify-response`. * Uses the shared common-utils response reader when that version is available, * while retaining compatibility with older installed common-utils versions. * * @param response Parsed DIDComm bundle returned by ICA. */ export declare function getOrganizationControllerCredentialSubjects(response: IcaVerifyTermsResponse): IcaOrganizationControllerCredentialSubject[]; /** Canonical name for reading ICA-issued service-controller subjects. */ export declare const getServiceControllerCredentialSubjects: typeof getOrganizationControllerCredentialSubjects; /** * Reads the stable alias and key material for every organization controller in * a verification response. * * @param response Parsed DIDComm bundle returned by ICA. */ export declare function extractOrganizationControllerBindingProjections(response: IcaVerifyTermsResponse): IcaOrganizationControllerBindingProjection[]; /** Canonical name for extracting service-controller binding projections. */ export declare const extractServiceControllerBindingProjections: typeof extractOrganizationControllerBindingProjections; //# sourceMappingURL=controllerBinding.d.ts.map