Skip to content

Install

Add the package for your platform, then create the SDK once at startup.

PlatformLanguagePackage
Web apps, desktop apps and the browser extensionTypeScriptseald-sdk on npm
iOS and macOSSwiftSealdSDK through Swift Package Manager
AndroidKotlinhealth.seald:sdk through Gradle

create makes no network call. The trust root built into the SDK and the timestamp authorities’ roots ship in the package.

Package and import

Terminal window
npm install seald-sdk
import { create } from 'seald-sdk';

API versions

Once created, the SDK reports the API majors it implements as sealdhealthcare.contract: sdkApi and cloudApi, each a number. Both are 1 in this release. A change that removes or renames anything in the SDK API or the Cloud API is a new major. A contract number keeps its meaning. It changes only when the shape changes. The Seald Healthcare Cloud refuses a Cloud API major it no longer serves with the error contract-retired.

Creating the SDK

const sealdhealthcare = await create({ kind: 'desktop', release: '1.4.0', adapters: { unlock, signIn } });

Config takes three fields:

FieldTypeMeaning
kindClientKindextension, desktop, mobile or sdk, stated on every session. The version floor applies per kind.
releasestring, major.minor.patchYour application’s own release, checked against the customer’s version floor at sign-in.
adaptersAdaptersWhat your platform and your application supply. See Adapters.

create returns the SDK bound to your platform. It fetches nothing. The first network call depends on the device:

  • On a new device, the first network call is sealdhealthcare.enroll(request).
  • On an enrolled device, sealdhealthcare.connect(tenantId) unlocks the device key locally. The first network call is the client.session.signIn() that follows.

Next