Developer SDK

C# examples

Install the SDK · View source on GitHub ↗

C# SDK installation

The managed wrapper uses P/Invoke and SafeHandle over sdk/cgo. The NuGet package carries native runtime assets; consumers do not need Go.

Publication status: not yet published: the URnetwork.SDK NuGet package. Its first publication comes with the next nightly that carries the stable SDK packages; until then, build the local package below. Stable releases use the app's release version (for example 2026.11.22); nightlies use the prerelease form 2026.11.22-1105365180.

Install with the native package manager

Shell
dotnet add package URnetwork.SDK

Visual Studio's NuGet UI and Paket use the same public NuGet package. Pin with dotnet add package URnetwork.SDK --version <version>.

Use dotnet add package URnetwork.SDK --prerelease for preview releases.

Supported platforms

The binding targets .NET 8+ on desktop. Only OS/architecture RIDs present in the package are supported. Native AOT, trimming, single-file publishing and mobile require separate validation.

GitHub and local builds

NuGet cannot use a Git URL as a package reference. Clone sdk, run make -C sdk/csharp, then install the .nupkg from sdk/csharp/dist/artifacts as a local NuGet source.

Examples

  • Integration: service provisioning, scoped client credentials and Device lifecycle.
  • Sockets: TCP/UDP, TLS/DTLS and HTTP client adapters.
  • Messages: live peer discovery and interoperable text/ACK exchange.
  • Provider: a provider client of your network with the consent disclaimer, status, payout wallet display and background run.
  • Embed: URnetwork inside your own app: one scoped client per installation from your backend, the in-app Device, and the installation's data caps; with the backend tool that provisions clients and sets caps.

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