UMIS SDK
    Preparing search index...

    Module @umis/verifier

    @umis/verifier

    This package decides whether a checkpoint accepts a presented credential. It works offline, runs nine steps and gives exactly one reason for a rejection. You need it wherever a device or a service checks a member’s credential.

    It covers one-way and full QR codes, the reverse QR exchange, the mutual exchange and frames over BLE. The @umis/verifier/oid4vp entry point covers OpenID4VP 1.0 login responses. The package runs in browsers, React Native and Node. It makes no network call except an explicit fetchStatusList.

    npm install @umis/verifier @umis/core @umis/policy
    
    Export What it does
    verifyAtCheckpoint(input, context) decides on a one-way or full QR text, or a full frame from a transport
    createRequestQr, createRequestFrame a request with a nonce of 16 random bytes, valid for 60 s by default and 120 s at most, and the pending record to check the answer
    verifyResponseQr(answer, pending, context) decides on the answer to that request, on channel qr_reverse for QR text or ble for a frame
    verifyCounterparty(request, context) decides on the initiator of a mutual exchange from its opening frame
    verifyPresentation the shared decision for any SD-JWT presentation with a key-binding JWT
    createMemoryReplayStore, observeTime an in-memory replay store, and how a store learns the time of a decision
    memberCacheEntryFromCredential the record a door keeps to accept one-way tokens of a credential
    serializeVerifierContext, deserializeVerifierContext the data of a context as JSON, and back
    createDecisionEvent the audit event of a decision, without claim values, for signEvent or a journal

    verifyAtCheckpoint, verifyResponseQr, verifyCounterparty and verifyVpResponse never throw for anything a presenter sends. The result is { decision, reasons, channel, at, trace, … }. On accept, reasons is ['OK']. On reject, it holds exactly one code. The trace always has the nine steps parse, issuer_trust, issuer_signature, holder_binding, validity, status, policy, authority and decision. The result carries claims, issuer and credential reference only once the verifier trusts the issuer and the issuer signature or the member cache vouches for the credential.

    The VerifierContext holds what the checkpoint needs to decide. It always has now, audiences, policy, trusted, statusLists and replay. trusted comes from parseRegistry. statusLists is a Map of URI to { token, fetchedAt }. The optional fields are memberCache for one-way tokens, ledger, selfIssuer, statusCache, fetchStatusList, skewSeconds, pointId and policyVersion. skewSeconds is 10 by default.

    Every verification in a deployment must use the same ReplayStore. Otherwise a presentation can be accepted once per store. The ids are ow:, kb:, req:, mutual: and vp:<nonce>. @umis/gateway adds relay:<jti>. No id comes from signature bytes. createMemoryReplayStore({ max, now }) holds at most max ids that have not expired. max is 100 000 by default. While the store is full, it refuses new ids. Without now, it learns the time from the verification calls.

    @umis/verifier/oid4vp is the provider’s side of an OpenID4VP 1.0 login. It makes an unsigned request by value that asks for UMIS credentials with DCQL. The wallet answers it with direct_post.

    Export What it does
    umisDcqlQuery({ vcts, claims, id? }) a DCQL query with one credential query, whose id is umis by default
    createVpRequest({ responseUri, nonce, state, dcql, clientName? }) { requestObject, walletUri } with the parameters and the openid4vp://?… link
    verifyVpResponse({ body, nonce, state, audience, trusted, fetchStatusList, now, policy?, replay? }) the decision on the posted form, on channel oid4vp

    createVpRequest refuses these inputs with INVALID_ARGUMENT.

    • A nonce that does not consist of 22 to 256 base64url characters. Make it from 16 random bytes or more. Use each nonce once.
    • An empty state, or one longer than 512 characters.
    • A clientName longer than 200 characters or with control characters.
    • A responseUri with a scheme other than https. Only localhost and 127.0.0.1 may use http.
    • A responseUri that has a fragment or user information, or is longer than 1 024 characters.
    • A DCQL query that breaks one of these rules. The query holds 1 to 8 credential queries. Each has a unique id of 1 to 64 letters, digits, _ or -, format: "dc+sd-jwt" and 1 to 8 vct_values. Each claim path names one UMIS claim.

    The client id is redirect_uri: followed by responseUri. Pass it as audience to verifyVpResponse.

    verifyVpResponse decides on the form the wallet posted, with its vp_token and state.

    • The reason is MALFORMED for a vp_token longer than 65 536 characters, for one that does not answer exactly one credential query with exactly one presentation, and for a state that differs.
    • The key-binding JWT must carry audience with its prefix and the request’s nonce. It must be at most 120 seconds old.
    • The verifier accepts each nonce once and records it as vp:<nonce> in replay. Without a replay store it remembers nothing. Pass the deployment’s one store.
    • The issuer must be in trusted. Status lists come only from fetchStatusList, once per address. Each list must be no older than the policy’s maximum age.
    • The policy is DEFAULT_POLICIES.login_oid4vp unless you pass one. The presentation must disclose the claims in the policy’s requestedClaims. Build the DCQL query from the same list.

    Your endpoint answers the wallet 200 with {"redirect_uri": "https://…"} on accept and 400 otherwise. The integration guide shows the whole sequence.

    See also the UMIS SDK, the profile, the security model, the integration guide and the API reference.

    Copyright 2026 Ishtvan Komonii. Licensed under the Apache License 2.0.

    oid4vp