UMIS SDK
    Preparing search index...

    Module @umis/core

    @umis/core

    @umis/core is the base that every other UMIS SDK package builds on, so you install it with any of them. It holds the constants and types of the UMIS profile v1, the crypto providers, compact JWS, the SD-JWT VC codec, the authority and delegation rules, QR and BLE frames, presentation requests and the decision journal. It runs in browsers, React Native and Node and imports no Node built-in.

    npm install @umis/core
    
    Area Exports
    Profile PROFILE_ID, VCT, TYP, ALG, DISCLOSABLE_CLAIMS, CHANNELS, RISK_CLASSES, CLASS_CAPS, LIMITS, FRAME_PREFIX, UMIS_BLE_V1 and the types of the profile
    Errors REASON_CODES, isReasonCode and UmisError, the only error the SDK throws
    Crypto webCryptoProvider, getDefaultCrypto, setDefaultCrypto, randomBytes, randomId, plus nobleCryptoProvider and the test-only keyFromSeed from @umis/core/noble
    Keys generateSigner, importSigner, webCryptoSigner, asEcPublicJwk, jwkThumbprint for RFC 7638 thumbprints, keyFingerprint, publicJwkEquals
    JWS signJws, verifyJws, decodeJwsUnverified
    SD-JWT VC issueCredential, presentCredential, parseSdJwt, verifyIssuerSignature, verifyKeyBinding, decodeCredential, checkCredentialTimes
    Authority matchAuthority, checkDelegation, isNarrowerItem, periodWindow, ledgerKey
    Frames and requests encodeFrame and decodeFrame for QR text, encodeFrameBytes and decodeFrameBytes for BLE, frameKindOf, classifyQr, signPresentationRequest, decodePresentationRequest
    Decision journal createMemoryJournal, verifyJournal, chainHash, canonicalJson for the JSON Canonicalization Scheme of RFC 8785, signEvent, verifyEvent
    Bytes and URIs Base45 of RFC 9285, base64url, hex, varint, UTF-8, parseQuery, formEncode, splitUri, wellKnownUrl

    Every signature and hash goes through a CryptoProvider. By default this is the runtime’s WebCrypto. For runtimes without WebCrypto, such as Expo Go, the @umis/core/noble entry offers nobleCryptoProvider. It is built on @noble/curves and @noble/hashes. Make it the default once at start-up with setDefaultCrypto(nobleCryptoProvider({ getRandomValues })), or let setupCrypto of @umis/wallet-rn choose. Both providers accept ES256 signatures with s in either half of the curve order, so never derive an identifier from signature bytes. Invariant I-15 of the security model explains why.

    import { generateSigner, signJws, verifyJws } from '@umis/core';

    const signer = await generateSigner({ kid: 'station-1' });
    const token = await signJws({ header: { typ: 'umis-event+jwt' }, payload: { hello: 'world' }, signer });
    const { payload } = await verifyJws(token, { typ: 'umis-event+jwt', key: signer.publicJwk });

    verifyJws accepts only ES256 and only the exact typ you pass. It refuses crit and any header member it does not know.

    A QR frame starts with FRAME_PREFIX[kind], continues with the Base45 text of the deflated container and ends with a . terminator. It holds at most 4 296 characters. Over BLE the same container travels as bytes after a one-byte kind. Decoders refuse a longer QR text before decoding it, and they cap the inflated size at 16 384 bytes. The UMIS profile v1 specifies the format.

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

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

    noble