Install
Add the package for your platform, then create the SDK once at startup.
| Platform | Language | Package |
|---|---|---|
| Web apps, desktop apps and the browser extension | TypeScript | seald-sdk on npm |
| iOS and macOS | Swift | SealdSDK through Swift Package Manager |
| Android | Kotlin | health.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
npm install seald-sdkimport { create } from 'seald-sdk';Swift Package Manager, product SealdSDK:
.package(url: "https://github.com/seald-healthcare/seald-sdk", from: "1.0.0")import SealdSDKGradle:
implementation("health.seald:sdk:1.0.0")import com.sealdhealthcare.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 } });let sealdhealthcare = try await SealdHealthcare.create(Config(kind: .mobile, release: "1.4.0", adapters: Adapters(unlock: unlock, signIn: signIn)))val sealdhealthcare = SealdHealthcare.create(Config(kind = ClientKind.MOBILE, release = "1.4.0", adapters = Adapters(unlock = unlock, signIn = signIn)))Config takes three fields:
| Field | Type | Meaning |
|---|---|---|
kind | ClientKind | extension, desktop, mobile or sdk, stated on every session. The version floor applies per kind. |
release | string, major.minor.patch | Your application’s own release, checked against the customer’s version floor at sign-in. |
adapters | Adapters | What 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 theclient.session.signIn()that follows.
Next
- Quickstart to open your first record.
- Adapters for
unlock,signInand the platform-supplied adapters. - Releases and the version floor for what
release-below-floormeans and how to recover from it.