UMIS SDK
    Preparing search index...

    Module @umis/wallet

    @umis/wallet

    This package is the holder’s side of UMIS. Use it to build a wallet that presents a member’s credentials to verifiers and receives credentials from issuers.

    It makes presentations as QR codes and BLE frames, including answers to a verifier’s request. Its OpenID4VCI 1.0 client receives credentials. The @umis/wallet/oid4vp entry point answers OpenID4VP 1.0 login requests. The holder key that the credential is bound to signs every frame. The package never discloses anything beyond what a request asks for. It runs in browsers, React Native and Node. On a phone, @umis/wallet-rn supplies the keys and the storage.

    npm install @umis/wallet @umis/core
    
    Export What it does
    createOneWayQr({ sdJwtVc, signer, now }) a 30-second one-way token for a door that already knows the credential, for the low class only
    createFullQr, createFullFrame the credential with the chosen disclosures and a fresh key-binding JWT, offered without a request
    parseRequestQr(input, { now, verifierKeys }) reads a request or the opening of a mutual exchange, and signatureVerified says whether a known key signed it
    disclosurePlan(request, credential) what answering would show, what the credential lacks, and whether it is usable
    createResponseQr, createResponseFrame the answer, bound to the request’s audience and nonce
    resolveOffer(uri), redeemOffer(view, txCode, signer, { now }) the OpenID4VCI 1.0 pre-authorised code flow
    decodeCredential reads a stored credential for display

    Before it makes anything, the wallet checks what you pass. A claim the request does not ask for, a credential of a type it does not accept and a signer other than the holder key all fail with INVALID_ARGUMENT. When a holder discloses authority, the wallet adds delegation if the credential has it and the request asks for it.

    resolveOffer reads an openid-credential-offer://?credential_offer=… link, or one with ?credential_offer_uri=…. It fetches the issuer metadata from /.well-known/openid-credential-issuer. It finds the token endpoint in the authorisation server’s /.well-known/oauth-authorization-server.

    redeemOffer first sends the token request. It then takes a nonce from the nonce endpoint, or the token response’s c_nonce when the issuer has no nonce endpoint. Last, it sends the credential request with a key proof signed by signer.

    Every address must be https. Only addresses on the local machine may use http. Requests refuse redirects. The credential must be bound to the signer’s key, be of the offered type and come from the offering issuer.

    parseVpRequest(walletUri) reads a request and respondToVpRequest({ walletUri, sdJwtVc, disclose, signer, now, fetch? }) answers it. The wallet takes only requests of this form.

    • A link openid4vp://?… or openid4vp://authorize?… of at most 16 384 characters, without a fragment.
    • response_type=vp_token and response_mode=direct_post.
    • A client_id of the form redirect_uri:<response_uri> whose address is the response_uri. The response_uri must be https, or http on localhost or 127.0.0.1.
    • A nonce and an optional state, each at most 1 024 characters.
    • A dcql_query with 1 to 8 credential queries. Each has its own id, format: "dc+sd-jwt", 1 to 8 vct_values and claims whose path names one UMIS claim.

    A request outside this form fails with one of three errors.

    Error When
    UNSUPPORTED_FORMAT the text is not an openid4vp:// address
    MALFORMED the request is damaged, for example too long, in another address form, with a missing or oversized field, with a non-JSON query or with ids that repeat
    PROTOCOL the request is well formed but outside the subset, for example with a parameter named twice, request_uri or request, transaction_data, another response type or mode such as direct_post.jwt, another client identifier, a client_id and response_uri that differ, or query features beyond the above

    The request is unsigned, so clientName is the verifier’s own word. parseVpRequest drops a client_name that has control characters or is longer than 200 characters. Your wallet UI must then show the host of responseUri instead.

    respondToVpRequest answers with the first credential query whose vct_values include the credential’s type. It discloses only the claims that query asks for. It posts the form vp_token={"<query id>":["<presentation>"]} with the request’s state to response_uri. The post sets redirect: 'error', so it does not follow redirects. A failed post is a NETWORK error. The function returns { status, redirectUri? }. It sets redirectUri only when the verifier answers 2xx with JSON whose redirect_uri is https, or http on the local machine. Your app then continues there.

    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