DataProofsDotnet.Extensions.DependencyInjection 1.5.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package DataProofsDotnet.Extensions.DependencyInjection --version 1.5.0
                    
NuGet\Install-Package DataProofsDotnet.Extensions.DependencyInjection -Version 1.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataProofsDotnet.Extensions.DependencyInjection" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataProofsDotnet.Extensions.DependencyInjection" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="DataProofsDotnet.Extensions.DependencyInjection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataProofsDotnet.Extensions.DependencyInjection --version 1.5.0
                    
#r "nuget: DataProofsDotnet.Extensions.DependencyInjection, 1.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataProofsDotnet.Extensions.DependencyInjection@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataProofsDotnet.Extensions.DependencyInjection&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=DataProofsDotnet.Extensions.DependencyInjection&version=1.5.0
                    
Install as a Cake Tool

dataproofs-dotnet

Securing mechanisms for documents and credentials in .NET — the single home for both proof families defined by the W3C and IETF securing-mechanism landscape.

Package What it gives you
DataProofsDotnet.Core W3C VC Data Integrity 1.0: proof model, add/verify pipeline, cryptosuite registry, JCS suites (eddsa-jcs-2022, ecdsa-jcs-2019), verification-method resolver abstraction
DataProofsDotnet.Jose JWS, JWE, JWT, JWK; SD-JWT (RFC 9901) with Key Binding; SD-JWT VC; VC-JOSE-COSE (JOSE half)
DataProofsDotnet.Cose COSE_Sign1 (RFC 9052), CWT (RFC 8392), VC-JOSE-COSE (COSE half)
DataProofsDotnet.Rdfc JSON-LD / RDFC-1.0 canonicalization, offline-default document loader, RDFC suites (eddsa-rdfc-2022, ecdsa-rdfc-2019), bbs-2023 selective disclosure
DataProofsDotnet.Legacy Pre–Data-Integrity Linked-Data-Signature suites (Ed25519Signature2020, EcdsaSecp256r1Signature2019), JCS + RDFC variants — opt-in, for interop with existing corpora only
DataProofsDotnet.Extensions.DependencyInjection AddDataProofs(...) composition

All cryptography routes through NetCrypto; all multiformats (multibase, multicodec, Multikey) and JCS through NetCid. Keys held in a NetCrypto IKeyStore are never exported — signing accepts an ISigner or key-store alias, and JWE ECDH key agreement accepts an opaque IEcdhKey, never raw private bytes.

Getting started

git clone https://github.com/moisesja/dataproofs-dotnet.git
cd dataproofs-dotnet
dotnet build DataProofsDotnet.sln
dotnet test DataProofsDotnet.sln

Runnable, narrated examples for every feature live under samples/ — each doubles as a CI smoke test. Start with samples/README.md.

RDFC canonicalization fails closed on data loss

JSON-LD processing drops what it cannot turn into RDF, and whatever it drops is not signed. So the RDFC suites (eddsa-rdfc-2022, ecdsa-rdfc-2019, bbs-2023, and the Legacy RDFC variant) refuse such input instead of signing less than the document says (VC Data Integrity 1.0 §2.4.3):

  • Creating a proof throws ProofGenerationException with an inner JsonLdDataLossException.
  • Verification fails with DATA_LOSS_DETECTION_ERROR.

Typical causes:

  • A term no @context defines. credentials/v2 has no @vocab. Define your terms, or list https://www.w3.org/ns/credentials/undefined-terms/v2 last, as VCDM 2.0 §5.2 requires. The offline loader bundles that context.
  • Proof terms no @context defines. A credentials/v1 document also needs https://w3id.org/security/data-integrity/v2. The Legacy RDFC variant needs https://w3id.org/security/suites/ed25519-2020/v1. Both are bundled.
  • An IRI that is not well formed. Examples: ?filter[id]=1, a second #, a space, a relative IRI.
  • An IRI the canonical form would respell. Examples: /a/../b, %41, HTTPS://HOST, :443. Relative IRIs resolved against an @base are respelled too, so they are refused.
  • Distinct IRIs dotNetRDF treats as one. Example: https://host next to https://host/. Their statements would merge.

Accepted input canonicalizes to the same bytes as before. See FR-9 in the PRD for the full rule.

Native AOT and trimming

All six packages declare IsAotCompatible: they build with zero trim, single-file and AOT analyzer warnings, and every System.Text.Json (de)serialization uses source-generated metadata, so they work in trimmed and native-AOT applications and in .NET 10 file-based apps. CI job ac-12 runs tasks/aot-smoke, which exercises every package, under JIT, with reflection-based serialization disabled, as a file-based app and as a native-AOT binary, and requires byte-identical output from all four. As a consumer:

  • DataProofsJsonOptions.Default serializes the library's own types through source-generated metadata in every host. For your types it falls back to reflection only where the host enables it. In a trimmed or AOT application, or any project with PublishAot, register them in your own JsonSerializerContext.
  • DataIntegrityProof can be listed in your own context directly ([JsonSerializable(typeof(DataIntegrityProof))]); its previousProof converter is public for that reason.
  • Publishing Rdfc, Legacy or the DI package with native AOT surfaces warnings from Newtonsoft.Json, dotNetRdf.Core's dependency, for dynamic support the RDFC path never reaches (IL2104/IL3053). Under TreatWarningsAsErrors they fail the publish; to keep them visible but not fatal, add <WarningsNotAsErrors>$(WarningsNotAsErrors);IL2104;IL3053</WarningsNotAsErrors>. That makes every dependency's collapsed trim/AOT warnings non-fatal, not only Newtonsoft.Json's, so check that each IL2104/IL3053 in your publish log names Newtonsoft.Json and nothing else. Core, Jose and Cose produce no IL warnings.

Design documents

License

Apache-2.0. See LICENSE.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 97 11/2/2026
1.5.0 99 10/28/2026
1.4.0 101 10/28/2026
1.3.0 166 8/5/2026
1.2.1 134 8/5/2026
1.2.0 133 8/5/2026
1.1.1 142 7/28/2026
1.1.0 144 6/22/2026
1.0.1 149 6/16/2026
1.0.0 137 6/15/2026
0.1.0-preview.2 90 6/14/2026
0.1.0-preview.1 97 6/13/2026