import type { IVerifiablePresentation, IZcap } from '@interop/data-integrity-core'; import type { DocumentLoader } from '../identity/documentLoader.js'; import { type ParsedGrants } from '../grants.js'; import { type GrantRequestCollection } from './loginRequest.js'; /** * Verifies a login response VP cryptographically and structurally (steps 1-2 * above). Throws on any failure. * * @param options {object} * @param options.presentation {IVerifiablePresentation} * @param options.challenge {string} the fresh nonce this app sent * @param options.domain {string} the domain this app sent (its origin) * @param options.documentLoader {DocumentLoader} * @returns {Promise} */ export declare function verifyLoginPresentation({ presentation, challenge, domain, documentLoader }: { presentation: IVerifiablePresentation; challenge: string; domain: string; documentLoader: DocumentLoader; }): Promise; /** * Extracts the delegated zcaps from a wallet response VP (`zcap` array). */ export declare function grantsOf(presentation: IVerifiablePresentation): IZcap[]; /** * A validated grant set: parsed topology plus the earliest expiry. */ export interface CheckedGrants { parsed: ParsedGrants; grants: IZcap[]; /** * ISO timestamp: the earliest expiry across the grants. */ expires: string; } /** * Structural validation of the granted zcaps (step 3 above). Throws on any * failure; returns the parsed topology and the earliest expiry on success. * * @param options {object} * @param options.grants {IZcap[]} * @param options.controllerDid {string} this app's seed-derived DID * @param options.collections {GrantRequestCollection[]} the collections that * must be covered (WAS collection id + visibility; the visibility selects * the class's allowed actions the required actions are capped at) * @param [options.requiredActions] {string[]} the actions each collection * grant must allow, capped per collection at its class's allowed actions * (defaults to `RW_ACTIONS`, so each collection requires exactly them) * @returns {CheckedGrants} */ export declare function checkGrants({ grants, controllerDid, collections, requiredActions }: { grants: IZcap[]; controllerDid: string; collections: GrantRequestCollection[]; requiredActions?: string[]; }): CheckedGrants; //# sourceMappingURL=verifyResponse.d.ts.map