JavaScript SDK installation
JavaScript wraps sdk/js (Go/WASM) and uses async Conn objects and Web Streams. It does not load the CGo native library.
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/sdkThe canonical name is awaiting its first publication. Its preview builds use npm install @urnetwork/; the unqualified command above requires a release on the latest tag. npm, pnpm, Yarn and Bun all consume the same package.
Supported platforms
The package loader runs in current browsers and Node; executable Node examples use Node 24+. Sockets use a configured hosted DeviceRemote. Messages use a native provider companion through extension RPC. The supplied messaging executable is a Node CLI; browser integrations can supply an extension-owned RPC transport. Bun is an alternative installer; Bun runtime behavior is not separately qualified.
GitHub and local builds
npm supports Git dependencies, but this repository's package is under js/. Use a published .tgz release asset, or clone sdk and run make -C sdk/js package check-package and install its tarball from sdk/. repository.directory is not a Git subdirectory installer.
The new messaging RPC capability requires the current SDK source. Its companion build guide lists the examples, sdk, connect, glog, goidenticons and gvisor sibling layout and exact commands. The message package uses file: so its JavaScript bundle and WASM come from that build.
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.
Apps use URNETWORK_ and a persisted URNETWORK_; only the service backend holds URNETWORK_. 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.