@open-matrix/sdk (0.1.3)

Published 2026-06-08 18:08:55 +00:00 by hivecast-admin

Installation

@open-matrix:registry=
npm install @open-matrix/sdk@0.1.3
"@open-matrix/sdk": "0.1.3"

About this package

@open-matrix/sdk

Public Matrix actor SDK facade for package authors.

Prefer narrow package imports when a package only needs one layer:

import { MatrixActor } from '@open-matrix/core';

Use this umbrella package when a package intentionally needs the combined actor, browser host, contracts, federation, and Omega kernel facade.

Import browser app build utilities directly from @open-matrix/browser-kit so headless actor packages can import @open-matrix/sdk without loading browser-only custom element code.

HiveCast-Managed Transport

For HiveCast-backed actors, use a HiveCast API key to exchange for short-lived actor-scoped NATS credentials:

import { exchangeHiveCastActorCredential } from '@open-matrix/sdk';

const credential = await exchangeHiveCastActorCredential({
  cloud: process.env.MATRIX_CLOUD!,
  space: process.env.MATRIX_SPACE!,
  apiKey: process.env.MATRIX_API_KEY!,
}, {
  mount: 'fresh.server.echo',
  accepts: { echo: {} },
});

The exchange returns NATS URLs plus a JWT/seed pair for the requested mount. Server actors use NatsTransport with credential.transport.natsUrl; browser actors use createBrowserNatsTransport with credential.transport.natsWsUrl.

Runnable demos:

  • demos/fresh-server-actor
  • demos/fresh-web-page

Proof:

MATRIX_CLOUD=https://<your-hivecast-cloud> \
MATRIX_SPACE=<your-space-root> \
MATRIX_API_KEY=<your-hivecast-api-key> \
pnpm run prove:fresh-samples

Dependencies

Dependencies

ID Version
@open-matrix/browser-host 0.1.3
@open-matrix/browser-kit 0.1.3
@open-matrix/contracts 0.1.3
@open-matrix/core 0.1.3
@open-matrix/federation 0.2.3
@open-matrix/omega-core 0.1.3

Development Dependencies

ID Version
typescript ^5.7.0
Details
npm
2026-06-08 18:08:55 +00:00
15
MIT
34 KiB
Assets (1)
sdk-0.1.3.tgz 34 KiB
Versions (5) View all
0.1.6 2026-07-03
0.1.5 2026-07-03
0.1.4 2026-06-08
0.1.3 2026-06-08
0.1.1 2026-06-08