Seald Healthcare SDK
The Client SDK encrypts, opens, saves and shares patient records under the tenant’s access policies. Your application calls the SDK and never handles a key.
Platforms and packages
| Platform | Language | Package |
|---|---|---|
| Web apps, desktop apps and the browser extension | TypeScript | npm install seald-sdk |
| iOS and macOS | Swift | Swift Package Manager, product SealdSDK |
| Android | Kotlin | Gradle, health.seald:sdk |
See Install for the import and the configuration of create.
Example: open a record
Create the SDK, connect to a tenant, sign in and open a record. open returns a decision:
allow, challenge or deny. Handle every case.
import { create } from 'seald-sdk';
const sealdhealthcare = await create({ kind: 'desktop', release: '1.4.0', adapters: { unlock, signIn } });const client = await sealdhealthcare.connect(tenantId); // unlocks the device keyawait client.session.signIn(); // signs in with the identity provider and proves the device key
const opened = await client.objects.open({ locator });switch (opened.outcome) { case 'allow': render(opened); // shows the fields and marks masked ones opened.close(); // discards the plaintext and its keys break; case 'challenge': return show(await opened.stepUp()); // signs in again, then repeats the request case 'deny': return showReason(opened.reason, opened.text); // shows why, and who can give access}import SealdSDK
let sealdhealthcare = try await SealdHealthcare.create(Config(kind: .desktop, release: "1.4.0", adapters: Adapters(unlock: unlock, signIn: signIn)))let client = try await sealdhealthcare.connect(tenantId) // unlocks the device keytry await client.session.signIn() // signs in with the identity provider and proves the device key
let opened = try await client.objects.open(ObjectRef(locator: locator))switch opened {case .allow(let value, _): render(value) // shows the fields and marks masked ones value.close() // discards the plaintext and its keyscase .challenge(let challenge): return show(try await challenge.stepUp()) // signs in again, then repeats the requestcase .deny(let denied): return showReason(denied.reason, denied.text) // shows why, and who can give access}import com.sealdhealthcare.sdk.*
val sealdhealthcare = SealdHealthcare.create(Config(kind = ClientKind.DESKTOP, release = "1.4.0", adapters = Adapters(unlock = unlock, signIn = signIn)))val client = sealdhealthcare.connect(tenantId) // unlocks the device keyclient.session.signIn() // signs in with the identity provider and proves the device key
val opened = client.objects.open(ObjectRef(locator))when (opened) { is Decided.Allow -> { render(opened.value) // shows the fields and marks masked ones opened.value.close() // discards the plaintext and its keys } is Decided.Challenge -> return show(opened.stepUp()) // signs in again, then repeats the request is Decided.Deny -> return showReason(opened.reason, opened.text) // shows why, and who can give access}The Quickstart walks through each step.
Documentation
| Section | Contents |
|---|---|
| Start here | Platforms, install, quickstart, and the adapters your application supplies |
| Use cases | Common tasks in three steps or fewer: edit, upload, find, share, ask for access, export |
| Build your app | Enroll a device, sessions, open, save, share, work offline |
| Administer a tenant | Policies, people and devices, legal holds, break-glass recovery, evidence |
| Concepts | Access decisions, plaintext lifetime, key domains, the trust model |
| Reference | Every namespace, type, error code and deny reason |