SpawnDev.Swarm
0.3.0
Prefix Reserved
See the version list below for details.
dotnet add package SpawnDev.Swarm --version 0.3.0
NuGet\Install-Package SpawnDev.Swarm -Version 0.3.0
<PackageReference Include="SpawnDev.Swarm" Version="0.3.0" />
<PackageVersion Include="SpawnDev.Swarm" Version="0.3.0" />
<PackageReference Include="SpawnDev.Swarm" />
paket add SpawnDev.Swarm --version 0.3.0
#r "nuget: SpawnDev.Swarm, 0.3.0"
#:package SpawnDev.Swarm@0.3.0
#addin nuget:?package=SpawnDev.Swarm&version=0.3.0
#tool nuget:?package=SpawnDev.Swarm&version=0.3.0
SpawnDev.Swarm
Membership, identity, authority and transport for a swarm of trusted devices on WebRTC - browser and desktop .NET from one codebase.
- Devices are enrolled by the swarm owner (QR pairing), and every connection proves it holds an enrolled key, bound to that connection's DTLS fingerprints.
- Roles come from an owner-signed registry and are checked on every message.
- A term-numbered lease decides who coordinates; partitions heal deterministically.
- Framed control messages and chunked bulk payloads with flow control, with no copies through the .NET heap.
Status: spec for review. See Plans/PLAN-Swarm.md.
Used by SpawnDev.Hive (model-level hive) and SpawnDev.ILGPU.P2P (kernel-level distributed compute). Built on SpawnDev.RTC.
License
MIT. See LICENSE.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SpawnDev.RTC (>= 2.5.8)
- SpawnDev.SpawnJS.Cryptography (>= 2.2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SpawnDev.Swarm:
| Package | Downloads |
|---|---|
|
SpawnDev.Hive
A model-level hive of trusted devices on SpawnDev.Swarm: skills, capability adverts, a placement planner and a router. Browser and desktop .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.10 | 54 | 12/2/2026 |
| 0.3.9 | 60 | 12/2/2026 |
| 0.3.8 | 79 | 12/2/2026 |
| 0.3.7 | 86 | 12/2/2026 |
| 0.3.6 | 79 | 12/2/2026 |
| 0.3.5 | 87 | 12/1/2026 |
| 0.3.4 | 85 | 12/1/2026 |
| 0.3.3 | 77 | 12/1/2026 |
| 0.3.2 | 88 | 12/1/2026 |
| 0.3.1 | 87 | 12/1/2026 |
| 0.3.0 | 85 | 12/1/2026 |
| 0.2.13 | 77 | 12/1/2026 |
| 0.2.12 | 88 | 12/1/2026 |
| 0.2.11 | 98 | 12/1/2026 |
| 0.2.10 | 92 | 11/30/2026 |
| 0.2.9 | 88 | 11/30/2026 |
| 0.2.8 | 83 | 11/30/2026 |
| 0.2.7 | 117 | 11/30/2026 |
| 0.2.6 | 88 | 11/30/2026 |
| 0.2.5 | 113 | 11/30/2026 |
v0.3.0 - Owner takeover (co-owner recovery): a co-owner listed in Owners can make itself root when the root key is lost (RootRotation.CreateTakeoverAsync), with forks detected loudly (RotationConflict, ComparisonCode, ResolveConflictAsync), the old root superseded, and the trust state exportable as one versioned blob (ExportTrustState / RestoreAsync). Handshake version 3 syncs rotation chains; it refuses version 2 peers (typed: VersionTooOld / LocalVersionTooOld), so upgrade every member together. v0.2.13 - Security: RegistryVerifier.AcceptRootRotationAsync refuses a rotation when the current registry revokes the pinned root, or the new root (a revoked root key could re-pin to its own key and undo the revocation; found by Data). On SpawnDev.RTC 2.5.8 (tracker client: serialized sends, re-announce on reconnect). v0.2.12 - On SpawnDev.RTC 2.5.4 and SpawnDev.SpawnJS.Cryptography 2.2.1 (correct assembly version; same code as 2.2.0): a SwarmLink whose data channels do not open reports each desktop connection's ICE candidates and candidate-pair states (PLAN-Swarm 2a). v0.2.11 - RegistryVerifier.Accepted: raised for every adopted (strictly newer) registry, from any path (handshake, pairing, relayed sync, the app), so an app can keep the newest registry for its next start. Additive. v0.2.10 - Device key persistence on SpawnDev.SpawnJS.Cryptography 2.2.0: SwarmKey.LoadOrCreateAsync(crypto, name) (the saved device key, or a new non-extractable one saved first), SaveAsync, LoadAsync, DeleteAsync. Browser keys are stored in IndexedDB without being exported, so they stay non-extractable; desktop uses a per-user file (DPAPI on Windows). SwarmKey.Key and SwarmKey.FromKeyAsync (wrap a stored signing key). Additive. v0.2.9 - Pairing through a tracker: PairingInvite.TrackerUrl (an extension; an invite without it encodes as before), PairingHost.ListenAsync and PairingGuest.JoinViaTrackerAsync meet in a room derived from the invite token, the new device making the only offer. SwarmCoordinator.DefaultLeaseDuration (6 s, measured) and a constructor that uses it. CanonicalReader.AtEnd. Additive. v0.2.8 - Persistent device keys: SwarmKey.ExportPrivateKeyAsync (PKCS#8, extractable keys only) and SwarmKey.FromPrivateKeyAsync(crypto, pkcs8, rawPublicKey), which refuses a private key that does not match the public key. Additive. v0.2.7 - On SpawnDev.RTC 2.5.3: desktop sessions no longer stall ~30 ms per packet (default bulk throughput 0.23 -> 6.6 MB/s; idle round trips ~59 ms -> under 10 ms, so heartbeats, leases and requests answer faster). SCTP tuning is no longer needed for speed. v0.2.6 - SwarmLink.ConnectAsync takes an RTCPeerConnectionConfig (rtcConfig): on desktop the SCTP burst settings cap data channel throughput (defaults 4 chunks / 50 ms: 0.23 MB/s measured; 256 / 2 ms: 10.5 MB/s). Bench_BulkThroughput test. v0.2.5 - Forward compatibility for wires built on Swarm: CanonicalWriter/CanonicalReader.Extensions (a canonical, bounded tag/bytes list read last, unknown tags skipped), CanonicalReader.BytesSlice (no copy), and SwarmSession.ReserveRange (an unregistered type inside a reserved range is dropped and counted instead of closing the session). v0.2.4 - On SpawnDev.SpawnJS.Cryptography 2.1.6 (one explicit WebCrypto Ed25519 probe; a malformed key from a peer can no longer move the process to managed keys). SwarmKey.VerifyAsync returns false, never throws, for a key that cannot be imported. v0.2.3 - SwarmLink.ConnectAsync: two devices over real RTC in one process with a session on each side (for tests of anything built on Swarm). The coordinator also renews on peers' heartbeats, so a background-tab coordinator keeps ~L/3 renewals while its timers are throttled. v0.2.2 - Heartbeat echo: a session answers each received heartbeat at once (capped at one per half interval), so a background browser tab keeps showing life through network events while its timers are throttled. Wire-compatible with 0.2.0 / 0.2.1. SwarmConnector.HeartbeatInterval and MissedBeatsBeforeClose (connector users could not set them before). v0.2.1 - On SpawnDev.RTC 2.5.2: connector sessions no longer die at tracker re-announces (RTC let a re-announce replace an established connection, ~every 30 s). SwarmConnector closes a session's peer connection when the session closes, so a dead peer can reconnect at once. Interoperates with 0.2.0. v0.2.0 - BREAKING: does not interoperate with 0.1.0 (handshake version 2; the whole hive upgrades together). Session heartbeat: a crashed peer is closed PeerUnresponsive in ~6 s instead of ICE's ~17.5 s (default 6 missed 1 s beats, sized from a measured background browser tab; desktop-only hives can set 3). Relaying for a partial mesh (SwarmRelayer) with bounded registry sync, and leases through relays (SwarmCoordinator.UseRelay). One role table for service types. A failed handshake or pairing closes the whole connection. On SpawnDev.SpawnJS.Cryptography 2.1.5. v0.1.0 - First release. Owner-signed registry with root rotation; a handshake bound to the verified DTLS fingerprints; authenticated sessions (per-channel Seq, fragmentation, one authorization gate, revocation close, credit flow control, goodbye); QR pairing with a commit-before-reveal 6-digit code; SwarmConnector over a WebTorrent tracker; term-and-lease coordinator (SwarmCoordinator). Browser and desktop .NET.