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: published. @urnetwork/sdk is on npm; the latest and nightly dist-tags carry the current release (2026.11.22-1105365180 as of November 27, 2026).

Install with the native package manager

Shell
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.

For preview builds, use npm install @urnetwork/sdk@nightly. The unqualified command selects the latest dist-tag.

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.
  • Provider: a provider client of your network through the native companion, with the consent disclaimer, status, payout wallet display and background run.
  • Embed: URnetwork inside your own app, for its own traffic: your backend provisions one client per installation, puts it in its ACL group and sets its data caps; the app runs a local Device and shows its status.
  • Hosted proxies: hosted proxies with unique exit IPs (Pro), reached over HTTPS and SOCKS5 with undici and socks-proxy-agent; no SDK needed.

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.