Developer SDK

TypeScript examples

Install the SDK · View source on GitHub ↗

TypeScript SDK installation

TypeScript uses sdk/js. Conn provides typed async reads/writes and Web Streams adapters; the Device exposes dial, dialTls and Direct Sockets constructors through directSockets.

Publication status: new package coordinates below describe the intended public release. They are not yet all published. Build the local package while publication is being prepared.

Install with the native package manager

npm install @urnetwork/sdk

Uses the same package as JavaScript, including TypeScript declarations. No separate @types package is needed. pnpm, Yarn and Bun are alternative installers. The canonical package's first publication is pending.

For preview builds, use npm install @urnetwork/sdk@nightly. The unqualified command selects the latest tag once a release is published there.

Supported platforms

The typed Node programs use Node 24+. Sockets use a hosted DeviceRemote; messages use a provider-capable native companion through extension RPC. The same SDK supplies browser types; the adjacent JavaScript socket directory includes the executable browser program.

GitHub and local builds

Use a packaged npm tarball, or clone and build sdk/js. See the JavaScript guide for Git package layout and compatibility migration details.

The new messaging RPC capability requires the current SDK source in the sibling-checkout layout. The message package uses file:../../../sdk/js. npm run build type-checks without emitting files; Node 24 runs main.ts directly with type stripping.

Examples

  • Integration: service provisioning, scoped client credentials and Device lifecycle.
  • Sockets: TCP/UDP, TLS/DTLS and HTTP client adapters.
  • Messages: live peers, targeted URMS text/ACK messages and offline codec tests through a native companion.

Apps use URNETWORK_CLIENT_JWT and a persisted URNETWORK_INSTANCE_ID; only the service backend holds URNETWORK_ROOT_JWT. See the shared contract and official networking research.

Use an SDK release containing the required APIs. The package plan records package names, build outputs and publication gates.

References

  • npm install — official package-manager documentation, checked September 14, 2026.