UMIS SDK
    Preparing search index...

    Function verifyVpResponse

    • Decides on the response to a request made by createVpRequest: body is the form the wallet posted (vp_token and state), nonce and state are those of the request and audience is its client_id, prefix included. The presentation goes through the nine steps with channel oid4vp: its key-binding JWT must carry that audience and nonce and be at most 120 seconds old, the nonce is accepted once (the id vp:<nonce> in replay; without a replay store nothing is remembered), the issuer must be one of trusted, and status lists come only from fetchStatusList, once for each address and held to the policy's maximum age. The policy is DEFAULT_POLICIES.login_oid4vp unless given, and the claims it names in requestedClaims must be disclosed; they are the claims the DCQL query of the request asks for.

      A body with no vp_token, more or fewer than one query id or presentation, or a state that differs, is MALFORMED, and so is a missing nonce or audience. The function never throws; the result has exactly one reason.

      Parameters

      • i: {
            audience: string;
            body: Record<string, string>;
            crypto?: CryptoProvider;
            fetchStatusList: (uri: string) => Promise<string>;
            nonce: string;
            now: number;
            policy?: CheckpointPolicyV1;
            replay?: ReplayStore;
            state?: string;
            trusted: readonly TrustedIssuerEntryV1[];
        }

      Returns Promise<VerificationResult>