Skip to content

Commit a4095b7

Browse files
committed
Update documentation and metadata for v1.0.1: Add README.nuget.md to fix NuGet README rendering, expand USAGE.md with new examples and Native AOT publishing guidance, refresh main README for stable release, and update version, changelog, and package metadata.
1 parent 90a92c9 commit a4095b7

7 files changed

Lines changed: 192 additions & 38 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ All notable changes to SolSharp are documented here. The format is loosely based
55
[semantic versioning](https://semver.org) — from 1.0.0 breaking changes only come with a major
66
version (on the earlier 0.x releases, minor versions could carry them).
77

8+
## [1.0.1]
9+
10+
Documentation-only release; no code changes.
11+
12+
### Fixed
13+
14+
- The NuGet package now carries a dedicated `README.nuget.md`: nuget.org renders a restricted
15+
markdown where raw HTML is shown as text, so the GitHub README's HTML-centered logo appeared as
16+
literal markup on the package page.
17+
18+
### Added
19+
20+
- `docs/USAGE.md` gains a **Publishing with Native AOT** section (enabling `PublishAot`, bringing
21+
your own `JsonSerializerContext` for your own models, chaining `CoreJsonContext`) and examples for
22+
the previously unillustrated reads: paging an address's signature history and walking a block,
23+
data-driven priority fees (`getRecentPrioritizationFees` + `getFeeForMessage`), token account
24+
balance and largest holders, and the node/cluster basics (health, version, block height,
25+
transaction count, supply, slot leaders, blockhash validity).
26+
- README refreshed for the stable line: roadmap and per-assembly status column removed, Native AOT
27+
moved to the top of the pitch, `samples/` added to the layout.
28+
829
## [1.0.0]
930

1031
First stable release. The public API is now covered by the semver compatibility promise.

‎CLAUDE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A lean, modern .NET SDK for Solana: RPC + WebSocket streaming, wire-level transa
44
signing/building. Optimised for low latency and a small dependency footprint — it is a
55
deliberate, focused alternative to the heavier general-purpose SDKs, not a clone of them.
66

7-
Status: 1.0.0, first stable release (semver compatibility promise now applies to the public API). All four projects are in place: Core primitives (incl. a Borsh reader/writer), the Rpc client (reads + typed account state via `Mint`/`TokenAccount`/`NonceAccount` + Token-2022 extension decoding (`TokenExtensionSet`), `jsonParsed` transaction/block/account reads, the full current JSON-RPC HTTP read surface (deprecated getStakeActivation excluded), send/simulate, JSON-RPC batching via `RpcBatch`, typed transaction errors, multiplexed WebSocket streaming with auto-reconnect, DI + resilience), the Wallet (Ed25519 keys, signing, verification, key parsing, BIP-39/SLIP-0010 mnemonic derivation), and Programs (System/Token/ATA/Compute Budget/Memo + the Address Lookup Table program, PDA/ATA, legacy + v0 transaction building/signing/parsing, durable-nonce builder support, and instruction decompilation). As of 0.7.0 all JSON is source-generated (no reflection) and every assembly is Native AOT compatible (`IsAotCompatible`), with an AOT smoke sample published and run in CI. A separate live integration suite exercises the read and streaming paths against a real cluster.
7+
Status: 1.0.1, first stable release line (semver compatibility promise now applies to the public API). All four projects are in place: Core primitives (incl. a Borsh reader/writer), the Rpc client (reads + typed account state via `Mint`/`TokenAccount`/`NonceAccount` + Token-2022 extension decoding (`TokenExtensionSet`), `jsonParsed` transaction/block/account reads, the full current JSON-RPC HTTP read surface (deprecated getStakeActivation excluded), send/simulate, JSON-RPC batching via `RpcBatch`, typed transaction errors, multiplexed WebSocket streaming with auto-reconnect, DI + resilience), the Wallet (Ed25519 keys, signing, verification, key parsing, BIP-39/SLIP-0010 mnemonic derivation), and Programs (System/Token/ATA/Compute Budget/Memo + the Address Lookup Table program, PDA/ATA, legacy + v0 transaction building/signing/parsing, durable-nonce builder support, and instruction decompilation). As of 0.7.0 all JSON is source-generated (no reflection) and every assembly is Native AOT compatible (`IsAotCompatible`), with an AOT smoke sample published and run in CI. A separate live integration suite exercises the read and streaming paths against a real cluster.
88

99
## Commands
1010

@@ -23,6 +23,7 @@ Run from the repo root (where `SolSharp.sln` lives):
2323
- **Attributes on their own line** — never inline with the member, e.g. `[JsonPropertyName("id")]` goes above the property, not beside it. `dotnet format` does not enforce this (only Rider does), so write it that way by hand.
2424
- **Target framework is `net8.0`.** Do not use net9-only APIs (e.g. `JsonStringEnumMemberName`, `InlineArray`-based span tricks that need newer ref-safety).
2525
- **Modern C# only.** File-scoped namespaces, `var`, collection expressions `[]`, primary constructors, switch expressions, pattern matching, `is null` / `is not null`. The full rule set lives in `.editorconfig` + `Directory.Build.props` — follow the analyzers, don't fight them. Do not restate style rules here.
26+
- **A feature is not done until it is documented.** Every user-facing addition or change lands in the same commit with all four documentation layers: (1) XML docs on the public API (enforced by CS1591 anyway); (2) `docs/USAGE.md` — a runnable example in the matching section (or a new section + `Contents` entry), with every snippet checked against the real signatures and model properties, not written from memory; (3) `README.md` — the wire-method list, feature bullets, and Layout if the shape of the repo changed (`README.nuget.md` only if the pitch/quick-start changes — it carries no method lists by design); (4) `CHANGELOG.md` under the release being prepared. Release-only extras: bump `Version` in `Directory.Build.props`, refresh `PackageReleaseNotes` in `src/SolSharp/SolSharp.csproj` (nuget.org shows only the current version's notes), and update the `Status:` line here.
2627

2728
## Architecture
2829

‎Directory.Build.props‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,18 @@
1313
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1414
</PropertyGroup>
1515

16-
<!-- Tests are exempt from the public-XML-docs rule; in library code a public member without docs
17-
surfaces CS1591 and fails the CI build (-warnaserror). -->
1816
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
1917
<NoWarn>$(NoWarn);CS1591</NoWarn>
2018
</PropertyGroup>
2119

2220
<PropertyGroup Label="Package metadata">
23-
<Version>1.0.0</Version>
21+
<Version>1.0.1</Version>
2422
<Authors>Yevhen Koval</Authors>
2523
<Product>SolSharp</Product>
26-
<!-- nuget.org search ranks by term relevance in id/title/tags/description, weighted by downloads;
27-
the title and tags below carry the terms people actually search for. -->
2824
<Title>SolSharp — Solana SDK for .NET</Title>
2925
<Copyright>Copyright (c) 2026 Yevhen Koval</Copyright>
3026
<PackageLicenseExpression>MIT</PackageLicenseExpression>
31-
<PackageReadmeFile>README.md</PackageReadmeFile>
27+
<PackageReadmeFile>README.nuget.md</PackageReadmeFile>
3228
<PackageTags>solana;solana-sdk;web3;blockchain;rpc;websocket;wallet;spl-token;token-2022;transactions;ed25519;crypto;defi;nativeaot;aot;trimming;source-generators</PackageTags>
3329
<RepositoryType>git</RepositoryType>
3430
<RepositoryUrl>https://github.com/jecacs/SolSharp</RepositoryUrl>
@@ -48,7 +44,7 @@
4844
</PropertyGroup>
4945

5046
<ItemGroup Condition="'$(IsPackable)' != 'false'">
51-
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" Visible="false" />
47+
<None Include="$(MSBuildThisFileDirectory)README.nuget.md" Pack="true" PackagePath="\" Visible="false" />
5248
<None Include="$(MSBuildThisFileDirectory)assets/icon.png" Pack="true" PackagePath="\" Visible="false" Condition="Exists('$(MSBuildThisFileDirectory)assets/icon.png')" />
5349
</ItemGroup>
5450

‎README.md‎

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ wire format and the signing path, without dragging in a large dependency graph.
1919
writing bots, indexers, or backend services that talk to Solana from .NET and care about
2020
speed and control, this is aimed at you.
2121

22-
> **Status: 1.0.0 — stable release.** SolSharp ships as a single NuGet package — `SolSharp` —
22+
> **Status: 1.0.1 — stable release.** SolSharp ships as a single NuGet package — `SolSharp` —
2323
> bundling the Core (primitives + encodings), Wallet (Ed25519 keys, signing, verification, BIP-39/SLIP-0010
2424
> mnemonic import), Rpc (the full JSON-RPC HTTP read surface + send/simulate + WebSocket streaming + DI), and
2525
> Programs (instructions + transaction building + signing, durable nonces) assemblies. JSON is
@@ -28,7 +28,7 @@ speed and control, this is aimed at you.
2828
2929
📖 **New here? Read the [usage guide](docs/USAGE.md)** — a task-oriented cookbook covering keys, reads,
3030
SPL token state, building/signing/sending transactions, v0 + address lookup tables, decoding transactions,
31-
WebSocket subscriptions, confirmation, and more.
31+
WebSocket subscriptions, confirmation, Native AOT publishing, and more.
3232

3333
## Motivation
3434

@@ -61,23 +61,23 @@ dotnet add package SolSharp
6161
```
6262

6363
```xml
64-
<PackageReference Include="SolSharp" Version="0.7.0" />
64+
<PackageReference Include="SolSharp" Version="1.0.1" />
6565
```
6666

67-
| Assembly | Purpose | Status |
68-
| ------------------ | --------------------------------------------------- | ------ |
69-
| `SolSharp.Core` | Primitives, encoding, JSON, program/sysvar constants | Usable |
70-
| `SolSharp.Wallet` | Ed25519 keys, key parsing, signing and verification | Usable |
71-
| `SolSharp.Rpc` | HTTP JSON-RPC reads + WebSocket streaming + DI | Usable |
72-
| `SolSharp.Programs`| Instructions (System/Token/ATA/Memo/Compute Budget/ALT) + transaction building | Usable |
67+
| Assembly | Purpose |
68+
| ------------------ | ---------------------------------------------------- |
69+
| `SolSharp.Core` | Primitives, encoding, JSON, program/sysvar constants |
70+
| `SolSharp.Wallet` | Ed25519 keys, key parsing, signing and verification |
71+
| `SolSharp.Rpc` | Full HTTP JSON-RPC read surface + WebSocket streaming + DI |
72+
| `SolSharp.Programs`| Instructions (System/Token/ATA/Memo/Compute Budget/ALT) + transaction building |
7373

7474
Keeping the split in the source means the layering stays compiler-enforced — dependencies point downward
7575
only: `Rpc` and `Wallet` build on `Core`, and `Programs` builds on `Core` and `Wallet`. `Core` depends on
7676
nothing else in the solution and pulls no network or crypto package.
7777

7878
See the [changelog](CHANGELOG.md) for what changed in each release.
7979

80-
## What's here today
80+
## What's inside
8181

8282
`SolSharp.Core`:
8383

@@ -207,25 +207,6 @@ var tx = new TransactionBuilder()
207207
var signature = await rpc.SendTransactionAsync(tx.Serialize());
208208
```
209209

210-
## Roadmap
211-
212-
- [x] Core primitives — `PublicKey`, `Base58`, `ShortVec`
213-
- [x] RPC enum + JSON converters (`Commitment`)
214-
- [x] Program / sysvar / mint constants + validation
215-
- [x] `SolSharp.Wallet` — Ed25519 keys, signing/verification, key parsing
216-
- [x] `SolSharp.Rpc` — HTTP reads (`getAccountInfo` / `getMultipleAccounts` / `getProgramAccounts` / `getSignaturesForAddress`, balances, blockhash, token supply, ...) + `sendTransaction` / `simulateTransaction`; multiplexed WebSocket streaming (slots, logs, accounts, programs, signatures, blocks) with auto-reconnect and optional `ILogger` diagnostics; DI + resilience
217-
- [x] `SolSharp.Programs` — System / Token (+ Token-2022) / ATA / Compute Budget / Memo instructions, PDA/ATA, transaction builder
218-
- [x] Versioned (v0) transactions + address lookup tables (compile / sign / fetch + decode / ALT program)
219-
- [x] Borsh reader + writer, typed SPL account state (`Mint` / `TokenAccount`), `Transaction.Deserialize` + instruction decompilation, and typed `TransactionError`
220-
- [x] Live integration test suite (configurable RPC / WS endpoint)
221-
- [x] Published NuGet package (single `SolSharp` package bundling the four assemblies)
222-
- [x] Durable nonces — nonce instructions + `NonceAccount` decoding + `TransactionBuilder.SetDurableNonce`
223-
- [x] Mnemonic wallet import — BIP-39 + SLIP-0010 (`solana-keygen` and Phantom/Solflare schemes)
224-
- [x] Token-2022 extensions — TLV decoding with typed views (transfer fee, metadata, delegate, ...)
225-
- [x] Devnet write gate — live airdrop / transfer / durable-nonce run before every release
226-
- [x] JSON-RPC batching, allocation-free (span) transaction serialization, `AddSolanaWs` DI
227-
- [x] BenchmarkDotNet harness (`benchmarks/`)
228-
229210
## Requirements
230211

231212
- .NET 8 SDK or later.
@@ -271,6 +252,7 @@ SolSharp/
271252
src/SolSharp.Wallet/ Keypair (+ parsing), ISigner, PublicKey.Verify / IsOnCurve
272253
src/SolSharp.Programs/ instructions, PDA/ATA, Message/Transaction, TransactionBuilder
273254
src/SolSharp/ packaging facade — bundles the four assemblies into the single NuGet package
255+
samples/ SolSharp.AotSmoke — native-compiled smoke sample, published and run in CI
274256
tests/ NUnit + FluentAssertions, mirroring each project
275257
(+ SolSharp.IntegrationTests: live-cluster read/streaming checks)
276258
.github/workflows/ ci.yml (build + offline tests) and release.yml (tag → NuGet trusted publishing)

‎README.nuget.md‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SolSharp
2+
3+
A lean, modern, Native AOT-ready .NET SDK for Solana — RPC, WebSocket streaming, and
4+
wire-level transaction signing and building. No reflection anywhere: all JSON is
5+
source-generated, and every assembly compiles clean to a native binary.
6+
7+
SolSharp is built for low latency and a small dependency footprint. If you are writing
8+
bots, indexers, or backend services that talk to Solana from .NET and care about speed
9+
and control, this is aimed at you.
10+
11+
## Why SolSharp
12+
13+
- **Native AOT ready.** Source-generated JSON (no reflection), trimmable, AOT-clean — ship a
14+
self-contained native binary with instant startup. CI runs a native-compiled smoke test on every push.
15+
- **Full RPC coverage.** The complete current JSON-RPC HTTP read surface, send/simulate,
16+
batching, and multiplexed WebSocket subscriptions with automatic reconnect.
17+
- **Wire-level control.** Spec-accurate legacy and v0 transaction building, signing, and decoding —
18+
every encoding checked byte-for-byte against the Rust `solana-sdk`.
19+
- **Lean.** No kitchen-sink dependency graph; allocation-free hot paths and span-based APIs.
20+
21+
## Quick start
22+
23+
```csharp
24+
using SolSharp.Rpc;
25+
using SolSharp.Wallet;
26+
using SolSharp.Programs;
27+
28+
// DI with a built-in resilience pipeline (or: new SolanaRpcClient(httpClient))
29+
services.AddSolanaRpc("https://your-rpc-endpoint");
30+
31+
var lamports = await rpc.GetBalanceAsync(account);
32+
33+
// Build, sign, and send a transfer
34+
using var payer = Keypair.Parse(secret);
35+
var blockhash = (await rpc.GetLatestBlockhashAsync()).Blockhash;
36+
37+
var tx = new TransactionBuilder()
38+
.SetRecentBlockhash(blockhash)
39+
.AddInstruction(SystemProgram.Transfer(payer.PublicKey, recipient, 1_000_000))
40+
.Build(payer);
41+
42+
var signature = await rpc.SendAndConfirmTransactionAsync(tx.Serialize());
43+
```
44+
45+
```csharp
46+
// WebSocket streaming
47+
await using var ws = new SolanaWsClient();
48+
await ws.ConnectAsync(new Uri("wss://your-rpc-endpoint"));
49+
await foreach (var slot in ws.SubscribeSlotsAsync())
50+
Console.WriteLine(slot.Slot);
51+
```
52+
53+
## Learn more
54+
55+
- [Usage guide](https://github.com/jecacs/SolSharp/blob/main/docs/USAGE.md) — a task-oriented
56+
cookbook: keys and mnemonic import, reads, SPL token state, priority fees, v0 + address lookup
57+
tables, durable nonces, decoding transactions, subscriptions, batching, and confirmation.
58+
- [GitHub repository](https://github.com/jecacs/SolSharp)
59+
- [Changelog](https://github.com/jecacs/SolSharp/blob/main/CHANGELOG.md)
60+
61+
## Security
62+
63+
SolSharp handles private keys and builds transactions that move funds. It has **not** been audited —
64+
use at your own risk. Never hand a raw private key to a dependency you do not control: sign with your
65+
own signer and simulate before sending.

0 commit comments

Comments
 (0)