import { SignedVerifiableCredential, createPresentation, signPresentation, PresentationSigningResult, RawVerifiablePresentation, DocumentLoader, PresentationVerificationResult } from '@trustvc/w3c-vc'; import { PrivateKeyPair } from '@trustvc/w3c-issuer'; type CreatePresentationOptions = NonNullable[1]>; type SignPresentationOptions = NonNullable[2]>; type SignW3CPresentationOptions = CreatePresentationOptions & SignPresentationOptions; declare const ENFORCED_SIGN: { readonly fullDisclosure: true; readonly checkHolderBinding: true; readonly version: "v2"; }; type BaseSignerOptions = Omit; type SignerOptions = BaseSignerOptions & ({ expiresInSeconds: number; } | { validUntil: string; }); /** * Creates AND signs a Verifiable Presentation in a single call, with trustvc's * policies ENFORCED: underived credentials are auto full-disclosed, holder binding * is required (signing key DID == holder == every credentialSubject.id), and a * mandatory expiry is stamped. With a `challenge` an authentication proof is produced; * without one, an assertionMethod proof. * @param {SignedVerifiableCredential | SignedVerifiableCredential[]} verifiableCredential - Credential(s) to present. * @param {PrivateKeyPair} keyPair - The holder's ECDSA (P-256) Multikey key pair. * @param {object} options - Per-request options (holder, challenge, domain, ...). The VP * lifetime is REQUIRED: pass `expiresInSeconds` OR an explicit `validUntil`. * `fullDisclosure` and `checkHolderBinding` are enforced and cannot be set here. * @returns {Promise} The signed presentation or an error. */ declare const signW3CPresentation: (verifiableCredential: SignedVerifiableCredential | SignedVerifiableCredential[], keyPair: PrivateKeyPair, options: SignerOptions) => Promise; type VerifierOptions = { challenge?: string; domain?: string; requireProof?: boolean; maxLifetimeSeconds?: number; documentLoader?: DocumentLoader; }; /** * Verifies a Verifiable Presentation with trustvc's policies ENFORCED: holder binding * is required (a valid holder proof whose key DID == holder == every credentialSubject.id) * and the VP expiry is checked. Every embedded credential is verified too. * @param {RawVerifiablePresentation} presentation - The presentation to verify. * @param {VerifierOptions} [options] - Per-request options (challenge, domain, * maxLifetimeSeconds, ...). `checkHolderBinding` is enforced and cannot be disabled. * @returns {Promise} The aggregated verification result. */ declare const verifyW3CPresentation: (presentation: RawVerifiablePresentation, options?: VerifierOptions) => Promise; export { signW3CPresentation, verifyW3CPresentation };