Install
In this section
The library is one package, @smart-health-checkin/client, with a separate entry point for each job: check-in pages, the picker, wallets, kiosks, FHIR, and testing. A project with a build step installs the package from a GitHub release. A page without one loads a hosted file instead, which works the same way.
From a release
The library isn't on the npm registry. Each GitHub release has a built package, and you install it by its URL. npm, pnpm, yarn, and Bun all accept a URL:
npm install https://github.com/smart-health-checkin/client/releases/download/v0.4.4/smart-health-checkin-client-0.4.4.tgzA release's URL always serves the same package, so the line pins one version. Each release's notes start with its own install line; watch the repository's releases to hear about new ones.
The package has no runtime dependencies. React is an optional peer dependency, needed only for /react. Every entry point ships as an ES module with .d.ts types, plus the TypeScript sources and source maps, so "go to definition" in your editor lands in the library's real code.
Hosted files
For a page with no build step, this site hosts each entry point that runs in a browser as one self-contained ES module. Load only the ones the page uses:
<script type="module" src="https://smart-health-checkin.org/client/lib/0.4.4/ui.js"></script>
<script type="module">
import { runCheckin } from "https://smart-health-checkin.org/client/lib/0.4.4/checkin.js";
</script>The files are at https://smart-health-checkin.org/client/lib/<version>/<file>, and each release's files never change once published. Without a version, /client/lib/<file> serves the latest release, so a page that uses it changes when a release comes out. Pinning versions says what to use in production.
Entry points
Import each one from the package, or load its hosted file where it has one.
| Entry point | Hosted file | What it gives you | Guide |
|---|---|---|---|
@smart-health-checkin/client |
checkin.js |
For check-in pages: runCheckin, wallets, CheckinResponse |
Without the picker, Responses |
/ui |
ui.js |
The <smart-checkin-picker> element |
The picker |
/react |
package only | <CheckinPicker> and useCheckin |
In React |
/picker |
package only | The picker's logic, for your own wallet list | A button for each wallet |
/wallet |
wallet.js |
For web wallets: serveWebWallet, matching, sealing |
Wallet guide |
/handoff |
handoff.js |
For kiosks: handoffWallet and the phone page's answerHandoff |
Kiosk hand-off |
/fhir |
fhir.js |
Optional: a response as a FHIR transaction | Writing FHIR |
/testing |
testing.js |
mockWallet, for demos and tests |
The mock wallet |
/model, /wire |
package only | The request and response types and validators, and the protocol bytes | API reference |
TypeScript settings
Use "moduleResolution": "bundler" (for Vite, webpack, or esbuild) or "node16"/"nodenext", which read the package's exports map. Older settings can't find the entry points. The types mention WebCrypto's CryptoKey, so a project that runs only on a server needs "DOM" in lib, or "skipLibCheck": true.
ES modules
The package has no CommonJS build, so load it with import. require() also works on Node 20.19 and later and 22.12 and later, which can load ES modules.
Frameworks
React has its own component, <CheckinPicker>. Angular, Vue, and other frameworks use the <smart-checkin-picker> element; In Angular, Vue, and others shows how to allow it and pass it a request, and TypeScript and the element shows how to type it.