NostrNet.Client
0.1.0-preview8
dotnet add package NostrNet.Client --version 0.1.0-preview8
NuGet\Install-Package NostrNet.Client -Version 0.1.0-preview8
<PackageReference Include="NostrNet.Client" Version="0.1.0-preview8" />
<PackageVersion Include="NostrNet.Client" Version="0.1.0-preview8" />
<PackageReference Include="NostrNet.Client" />
paket add NostrNet.Client --version 0.1.0-preview8
#r "nuget: NostrNet.Client, 0.1.0-preview8"
#:package NostrNet.Client@0.1.0-preview8
#addin nuget:?package=NostrNet.Client&version=0.1.0-preview8&prerelease
#tool nuget:?package=NostrNet.Client&version=0.1.0-preview8&prerelease
<p align="center"> <img src="https://raw.githubusercontent.com/Galaxoid-Labs/NostrNet/main/logo.png" alt="NostrNet" width="320" /> </p>
NostrNet.Client
High-level façade for the NostrNet
.NET 10 Nostr client library. Pulls in NostrNet.Core, NostrNet.Crypto,
and NostrNet.Relay transitively — most apps need only this one
reference.
using NostrNet.Client;
using NostrNet.Keys;
using var key = PrivateKey.Generate();
await using var client = await NostrClient.Builder(key)
.UseRelays("wss://relay.damus.io", "wss://nos.lol")
.ConnectAsync();
await client.PostNoteAsync("Hello, Nostr!");
With a local event store
Attach an INostrEventStore for auto-dedup across relays, NIP-01
replaceable / addressable upsert, NIP-09 deletion handling, NIP-40
expiration, and live reactive queries:
using NostrNet.Client.Storage; // generic typed accessors
using NostrNet.Profiles;
using NostrNet.Relay;
using NostrNet.Relay.Storage;
var store = new MemoryEventStore();
await using var client = await NostrClient.Builder(key)
.WithEventStore(store)
.UseRelays("wss://relay.damus.io", "wss://nos.lol")
.ConnectAsync();
// Subscribe — events flow into the store; you don't iterate this call.
_ = client.AttachAsync(new[]
{
new Filter { Kinds = new[] { 0, 1 }, Authors = new[] { key.PublicKey.ToHex() } },
}, ct);
// Read typed values — Profile.Kinds = [0] is applied automatically.
await foreach (var profile in store.ObserveAsync<Profile>(ct: ct))
cache[profile.Owner!] = profile;
For Marmot (MLS-over-Nostr) group messaging, additionally reference
NostrNet.Marmot + an MLS provider package (NostrNet.Marmot.Mls.Native).
Full quickstart and the typed-access reference table: see the main project README.
| 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
- NBitcoin.Secp256k1 (>= 4.0.0)
- NostrNet.Core (>= 0.1.0-preview8)
- NostrNet.Crypto (>= 0.1.0-preview8)
- NostrNet.Relay (>= 0.1.0-preview8)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NostrNet.Client:
| Package | Downloads |
|---|---|
|
NostrNet.Marmot
Marmot protocol (MLS-over-Nostr) wire envelope. Provides the Nostr-layer event kinds, TLS codec, and Marmot Group Data extension. MLS itself is pluggable via IMarmotMlsProvider. |
|
|
NostrNet.Blossom
Blossom protocol (https://github.com/hzrd149/blossom) — typed Nostr events (NIP-B7 kind-10063 user server list) plus HTTP client primitives for upload / download / list / delete against Blossom servers. Builds on NostrNet.Core for events and NostrNet.Client for relay publish/subscribe convenience. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview8 | 99 | 5/16/2026 |
| 0.1.0-preview7 | 67 | 5/15/2026 |
| 0.1.0-preview6 | 74 | 5/15/2026 |
| 0.1.0-preview5 | 77 | 5/15/2026 |
| 0.1.0-preview4 | 71 | 5/15/2026 |
| 0.1.0-preview3 | 81 | 5/15/2026 |
| 0.1.0-preview2 | 104 | 5/15/2026 |
| 0.1.0-preview19 | 198 | 5/18/2026 |
| 0.1.0-preview18 | 76 | 5/18/2026 |
| 0.1.0-preview17 | 73 | 5/18/2026 |
| 0.1.0-preview16 | 75 | 5/17/2026 |
| 0.1.0-preview15 | 80 | 5/17/2026 |
| 0.1.0-preview14 | 79 | 5/17/2026 |
| 0.1.0-preview13 | 78 | 5/17/2026 |
| 0.1.0-preview12 | 72 | 5/17/2026 |
| 0.1.0-preview11 | 74 | 5/17/2026 |
| 0.1.0-preview10 | 76 | 5/16/2026 |