@espuni/core
v0.2.0
Published
Framework-free, isomorphic core shared by the espuni SDKs (AV DC-API/OID4VP fallback selection, deeplink/QR scheme, claim extraction, config builders)
Readme
@espuni/core
Framework-free, isomorphic core shared by the espuni SDKs and the portal. Pure logic only — no I/O, no DOM, no environment access — so it runs identically in Node and the browser and is trivially unit-testable.
It is the shared "brain" behind the AV DC-API → OID4VP/QR fallback:
resolveAvProtocol(hasDcApi, requested?)— DC API (ISO 18013-7) vs OID4VP selection.rewriteDeeplinkScheme(uri, scheme?)/resolveAvDeeplinkScheme(value?)—openid4vp://→av://rewrite.buildAvOfferLinks(offer, scheme?)— QR / same-device deeplink derivation.extractAgeOver18(claims)— normalizes both CP result shapes (flat object and array-of-credentials).buildFallbackVerifierConfig(...)— EUDIPLOredirect_uripresentation config.
Consumed today by apps/portal (via transpilePackages); intended to be the
common core for the forthcoming @espuni/node and @espuni/browser SDKs so the
fallback logic is written and tested once.
Workspace note:
main/exportspoint atsrc/for zero-build source consumption inside the monorepo. Switch to adistbuild + conditional exports when publishing to npm.
